@nodesecure/i18n
Version:
NodeSecure Internationalization
20 lines • 1.01 kB
TypeScript
import { type Languages } from "./constants.ts";
import { taggedString } from "./utils.ts";
export declare const CONSTANTS: {
CACHE_PATH: string;
CURRENT_LANG: Languages;
LANG_UPDATED: boolean;
};
export declare function getLocalLang(): Promise<Languages>;
export interface SetLocalLangOptions {
/** If true, calls getLocalLang() after setting and returns the language. */
force?: boolean;
}
export declare function setLocalLang(selectedLang: Languages, options?: SetLocalLangOptions): Promise<Languages | void>;
export declare function getLanguages(): Promise<string[]>;
export declare function getToken(token: string, ...params: any[]): Promise<string>;
export declare function getTokenSync(token: string, ...params: any[]): string;
export declare function extend(extendLanguage: Languages, opts?: Record<string, any>): void;
export declare function extendFromSystemPath(languagesDirPath: string): Promise<void>;
export { taggedString, type Languages };
//# sourceMappingURL=index.d.ts.map