UNPKG

apphouse

Version:

Component library for React that uses observable state management and theme-able components.

29 lines (28 loc) 1.06 kB
import { IntlConfig } from 'react-intl'; export declare const SupportedLocales: string[]; export declare const localeBundles: Record<symbol, IntlConfig['messages']>; interface OptionsType { value: string; label: string; } export declare class Locale { private defaultLocale; supportedLanguages: string[]; locale: string; strings: any; constructor(defaultLocale?: string); get selectedLocale(): string; get messages(): Record<symbol, IntlConfig['messages']>; get supportedLanguagesList(): string[]; getDefaultLocale: () => string; getLocaleFromUrl: (userLocale?: string) => string; setLocale: (locale: string) => Promise<void>; setStrings: (messages: any) => void; getStringsFromLocale: (locale: string) => Promise<any>; setStringsForLocale: (locale: string) => void; getSupportedLanguagesOptions: () => Array<OptionsType>; } export declare const currentLocale: Locale; export declare function getFirstBrowserLanguage(): any; export declare function getSupportedLanguage(): string; export {};