cbcore-ts
Version:
CBCore is a library to build web applications using pure Typescript.
45 lines (44 loc) • 2 kB
TypeScript
import { UILanguageService, UILocalizedTextObject, UIRoute, UIView } from "uicore-ts";
import { CBLocalizedTextObject } from "./CBDataInterfaces";
export interface ParticularLanguageValues {
[x: string]: string;
topBarTitle: string;
selectLanguageTitle: string;
languageNameShort: string;
leftBarTitle: string;
languageName: string;
}
export interface LanguageValues {
[x: string]: ParticularLanguageValues;
en: ParticularLanguageValues;
est: ParticularLanguageValues;
}
export declare class CBLanguageService implements UILanguageService {
static currentClassObject: typeof CBLanguageService;
static _currentLanguageKey: string;
static languageValues: LanguageValues;
static languages: any;
static useStoredLanguageValues(values?: {}): void;
static broadcastLanguageChangeEvent(view?: UIView): void;
static get defaultLanguageKey(): any;
static get currentLanguageKey(): string;
updateCurrentLanguageKey(): void;
static updateCurrentLanguageKey(route?: UIRoute): void;
get currentLanguageKey(): string;
static stringForKey(key: string, languageKey: string, defaultString: string, parameters?: {
[x: string]: string | UILocalizedTextObject;
}): string;
stringForKey(key: string, languageKey: string, defaultString: string, parameters?: {
[x: string]: string | UILocalizedTextObject;
}): string;
static localizedTextObjectForKey(key: string, defaultString?: string, parameters?: {
[x: string]: string | UILocalizedTextObject;
}): {};
localizedTextObjectForKey(key: string, defaultString?: string, parameters?: {
[x: string]: string | UILocalizedTextObject;
}): {};
static localizedTextObjectForText(text: string): any;
localizedTextObjectForText(text: string): any;
static stringForCurrentLanguage(localizedTextObject: CBLocalizedTextObject | string): string;
stringForCurrentLanguage(localizedTextObject: CBLocalizedTextObject): string;
}