UNPKG

@frank-auth/react

Version:

Flexible and customizable React UI components for Frank Authentication

54 lines 2.3 kB
import { Locale, LocaleDirection, LocaleMessages } from './types'; export * from './types'; export * from './en'; export * from './es'; export * from './fr'; export * from './de'; export * from './pt'; export * from './it'; export * from './ja'; export * from './ko'; export * from './zh'; export type { Locale, LocaleMessages }; export declare const AVAILABLE_LOCALES: Locale[]; export declare const LOCALE_REGISTRY: Record<Locale, LocaleMessages>; export declare const DEFAULT_LOCALE: Locale; export declare const LOCALE_INFO: Record<Locale, { name: string; nativeName: string; region: string; direction: LocaleDirection; dateFormat: string; timeFormat: string; numberFormat: Intl.NumberFormatOptions; pluralRules: Intl.PluralRules; }>; export declare const getLocale: (locale: Locale) => LocaleMessages; export declare const getLocaleInfo: (locale: Locale) => { name: string; nativeName: string; region: string; direction: LocaleDirection; dateFormat: string; timeFormat: string; numberFormat: Intl.NumberFormatOptions; pluralRules: Intl.PluralRules; }; export declare const isValidLocale: (locale: string) => locale is Locale; export declare const detectBrowserLocale: () => Locale; export declare const formatMessage: (message: string, values?: Record<string, string | number>) => string; export declare const pluralize: (count: number, messages: { zero?: string; one: string; other: string; }, locale?: Locale) => string; export declare const t: (locale: Locale, key: string, values?: Record<string, string | number>) => string; export declare const isRTL: (locale: Locale) => boolean; export declare const formatNumber: (value: number, locale: Locale, options?: Intl.NumberFormatOptions) => string; export declare const formatDate: (date: Date, locale: Locale, options?: Intl.DateTimeFormatOptions) => string; export declare const formatRelativeTime: (date: Date, locale: Locale) => string; export declare const getValidationMessage: (locale: Locale, rule: string, field: string, value?: any) => string; export declare const saveLocaleToStorage: (locale: Locale) => void; export declare const loadLocaleFromStorage: () => Locale | null; export declare const detectLocale: () => Locale; //# sourceMappingURL=index.d.ts.map