1 | export declare const localizationPath = "/services/i18n";
|
2 | export declare const AsyncLocalizationProvider: unique symbol;
|
3 | export interface AsyncLocalizationProvider {
|
4 | getCurrentLanguage(): Promise<string>;
|
5 | setCurrentLanguage(languageId: string): Promise<void>;
|
6 | getAvailableLanguages(): Promise<LanguageInfo[]>;
|
7 | loadLocalization(languageId: string): Promise<Localization>;
|
8 | }
|
9 | export interface Localization extends LanguageInfo {
|
10 | translations: {
|
11 | [key: string]: string;
|
12 | };
|
13 | }
|
14 | export interface LanguageInfo {
|
15 | languageId: string;
|
16 | languageName?: string;
|
17 | languagePack?: boolean;
|
18 | localizedLanguageName?: string;
|
19 | }
|
20 | export declare type FormatType = string | number | boolean | undefined;
|
21 | export declare namespace Localization {
|
22 | function format(message: string, args: FormatType[]): string;
|
23 | function localize(localization: Localization | undefined, key: string, defaultValue: string, ...args: FormatType[]): string;
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | function normalize(value: string): string;
|
32 | function transformKey(key: string): string;
|
33 | }
|
34 |
|
\ | No newline at end of file |