Locale Notice

Locale Notice is a copy-paste React component that stops 1,000 read as one in germany before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/locale-notice
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

Stops1,000 read as one in Germany

Was this component page useful?

How do I install Locale Notice?

pnpm dlx shadcn@latest add @bollard/locale-notice

The files land in your project. They're yours to edit.

How do I use Locale Notice in React?

locale-notice-usage.tsx
import { LocaleNotice, LocaleNumberField } from "@/components/ui/locale-notice"

<LocaleNotice value={1000} readerLocale="de-DE" onUseSafe={setUnits} />

What input mistakes does Locale Notice catch?

  • Numbers whose separators flip meaning between locales
  • Dates like 04/03 read day-first vs month-first
  • Decimal comma or point typed for the wrong locale
  • Offers an unambiguous form (SI grouping, worded month)

What props does Locale Notice accept?

LocaleNotice props
PropTypeDefault
value* (required)

The number or date you are about to show someone.

number | Date—
authorLocale

The locale it is written in.

string"en-US"
readerLocale* (required)

The locale of the person reading it, e.g. "de-DE".

string—
numberOptions

Number formatting (currency, fraction digits). Ignored for dates.

Intl.NumberFormatOptions—
onUseSafe

Called with a form no reader can misread ("1 000", "Mar 4, 2026"). Shows a one-tap fix when set.

(text: string) => void—
hereLabel

Label of the author column. `{place}` is filled in.

string"Here · {place}"
misreadText

Templates: `{value}`, `{place}`, `{there}`, `{misread}`, `{safe}` are filled in.

string"In {place}, {value} reads as {misread}."
sameText

Shown when both locales read the value the same way.

string"Reads the same in {place}."
safeLabel

Button text to use the unambiguous form.

string"Write {safe}"

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is Locale Notice accessible?

  • Notice and hints are polite live regions
  • Input has a visible label and is described by the hint
  • Keep button has an aria-label and title; icons are aria-hidden

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Uses the browser's Intl data, which varies by browser version
  • Only compares two locales at a time
  • Can't know the reader's locale unless you pass it

What expensive mistakes does Locale Notice stop?

1,000 read as one in Germany

Also known as

locale · number format · decimal separator · intl · i18n · date format · lakh format · international users

What dependencies does Locale Notice require?

Locale Notice facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameLocale Notice
Registry identifier@bollard/locale-notice
Install commandnpx shadcn@latest add @bollard/locale-notice
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Locale Notice

What form validation mistake does Locale Notice catch?

Locale Notice prevents 1,000 read as one in Germany. Shows a number or date as the reader's locale would read it, so 1,000 isn't taken as 1 in Germany or 04/03 as the wrong day. Catches: Numbers whose separators flip meaning between locales, Dates like 04/03 read day-first vs month-first, Decimal comma or point typed for the wrong locale, Offers an unambiguous form (SI grouping, worded month). Limitation: validate locale-notice schemas on backend.

How do I install locale-notice with shadcn?

Run `npx shadcn@latest add @bollard/locale-notice`. Sources added: registry/default/locale-notice/locale-format.ts, registry/default/locale-notice/locale-notice.tsx. Package requirements: lucide-react.

What props customize Locale Notice?

Locale Notice accepts `value`, `authorLocale`, `readerLocale`, `numberOptions`, `onUseSafe`. Configures locale, number format, decimal separator behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of locale-notice?

Uses the browser's Intl data, which varies by browser version. Only compares two locales at a time. Can't know the reader's locale unless you pass it Server requirement: backend verification for locale-notice.

How does Locale Notice meet accessibility guidelines?

Notice and hints are polite live regions. Input has a visible label and is described by the hint. Keep button has an aria-label and title; icons are aria-hidden. Minimizes errors: comma decimal confusion, number format different locale.

Which components pair with Locale Notice?