Skip to content

Components

Locale Provider

The language for everything inside: how dates, numbers and money read, and every word components show or announce. Without it, "en-US" and English.

Répétition
Tous les
jours
semaines
mois
ans

Tous les 2 semaines
Prochaines : 12 oct. 2026, 26 oct. 2026, 9 nov. 2026

Import

import { LocaleProvider, useLocale, useMessages, ENGLISH } from '@rinzai/zen';

Examples

Right to left

Right to left: set dir="rtl" on the page (or any part of it). Layout, arrow keys and arrows follow; LocaleProvider gives the locale and words.

سحنثرخج

API reference

<LocaleProvider>

The language for everything inside: locale formats dates, numbers and money and picks month and weekday names and the week's first day (a component's own locale prop still wins), and messages replaces any of the words components show or announce (see ENGLISH for them all; the rest stay English). Without it, components use "en-US" and English. Nest one to change part of the page.

PropTypeDefault
locale

e.g. "en-IN", "fr-FR". Defaults to the enclosing provider's, or "en-US".

string—
messages

Any of the words to replace; the others are kept.

Partial<{ clear: string; cancel: string; close: string; dismiss: string; delete: string; remove: (item: string) => string; noResults: string; search: string; expand: string; collapse: string; minimum: string; ... 107 more ...; notifications: string; }>—