@gomani/i18n@1.2.0
npm size budget3.8 KB / 6.0 KB ✓
@gomani/i18n
Messages use ICU (plural/select/nesting). The active locale is a signal resolved per request (URL prefix → cookie → Accept-Language), so only the chosen locale's HTML — and only that locale's glyphs — ship.
API
createI18n
function
createI18n(config: I18nConfig): I18n
Set up messages, locales, and formatters. t formats ICU messages against the active-locale signal.
direction
function
direction(locale: string): 'ltr' | 'rtl'
Resolve writing direction for a locale; stamped on .