Interface I18n
interface I18n {
i18next: i18n;
language: string;
ns: I18nNamespaces;
t: TFunction<"translation", undefined>;
loadFilesystemResources(
fs: I18nFilesystemAdapter,
rootPath?: string,
): Promise<I18nResourceLoadResult>;
localeToLanguage(locale: string): string;
setLanguage(locale: string): void;
}
i18next: i18n;
language: string;
ns: I18nNamespaces;
t: TFunction<"translation", undefined>;
loadFilesystemResources(
fs: I18nFilesystemAdapter,
rootPath?: string,
): Promise<I18nResourceLoadResult>;
localeToLanguage(locale: string): string;
setLanguage(locale: string): void;
}
Index
Properties
Methods
Properties
Readonlyi18next
i18next: i18n
Get the i18next instance
Readonlylanguage
language: string
Get the current language
Readonlyns
Get fixed translation functions for particular namespaces
Readonlyt
t: TFunction<"translation", undefined>
Get the translation function
Methods
loadFilesystemResources
- loadFilesystemResources(
fs: I18nFilesystemAdapter,
rootPath?: string,
): Promise<I18nResourceLoadResult> Parameters
- fs: I18nFilesystemAdapter
OptionalrootPath: string
Returns Promise<I18nResourceLoadResult>
Interface for internationalization functionality.
Mirrors i18n API and helpers from kernel/src/tree/i18n.ts.