export declare type LocalizedText = string | Record; /** * Turns string feilds of objects into `LocalizedText` * * For instance: * * ``` * Localized<{ * name: string * nick?: string * avatar: {file: string, size: number} * permissions: string[] * }> * ``` * * is equivalent to * * ``` * { * name: LocalizedText * nick?: LocalizedText * avatar: {file: LocalizedText, size: number} * permissions: string[] * } * ``` */ export declare type Localized | undefined> = { [K in keyof L]: L[K] extends (string | undefined) ? LocalizedText : (L[K] extends (Record | undefined) ? Localized : L[K]); }; export declare const DEFAULT_LANGUAGE = "en"; export declare function getLocalizedText(localizedText: LocalizedText, lang?: string): string | undefined; export declare function getNavigatorLanguage(): string; export declare function localize(input?: LocalizedText | undefined): string;