73 lines
2.1 KiB
TypeScript
73 lines
2.1 KiB
TypeScript
/**
|
|
* Returns the user's locale
|
|
*/
|
|
export declare function getLocale(): string;
|
|
export declare function getCanonicalLocale(): string;
|
|
/**
|
|
* Returns the user's language
|
|
*/
|
|
export declare function getLanguage(): string;
|
|
interface TranslationOptions {
|
|
escape?: boolean;
|
|
}
|
|
/**
|
|
* Translate a string
|
|
*
|
|
* @param {string} app the id of the app for which to translate the string
|
|
* @param {string} text the string to translate
|
|
* @param {object} vars map of placeholder key to value
|
|
* @param {number} number to replace %n with
|
|
* @param {object} [options] options object
|
|
* @return {string}
|
|
*/
|
|
export declare function translate(app: string, text: string, vars?: object, count?: number, options?: TranslationOptions): string;
|
|
/**
|
|
* Translate a plural string
|
|
*
|
|
* @param {string} app the id of the app for which to translate the string
|
|
* @param {string} textSingular the string to translate for exactly one object
|
|
* @param {string} textPlural the string to translate for n objects
|
|
* @param {number} count number to determine whether to use singular or plural
|
|
* @param {Object} vars of placeholder key to value
|
|
* @param {object} options options object
|
|
* @return {string}
|
|
*/
|
|
export declare function translatePlural(app: string, textSingular: string, textPlural: string, count: number, vars?: object, options?: TranslationOptions): string;
|
|
/**
|
|
* Get the first day of the week
|
|
*
|
|
* @return {number}
|
|
*/
|
|
export declare function getFirstDay(): number;
|
|
/**
|
|
* Get a list of day names (full names)
|
|
*
|
|
* @return {string[]}
|
|
*/
|
|
export declare function getDayNames(): string[];
|
|
/**
|
|
* Get a list of day names (short names)
|
|
*
|
|
* @return {string[]}
|
|
*/
|
|
export declare function getDayNamesShort(): string[];
|
|
/**
|
|
* Get a list of day names (minified names)
|
|
*
|
|
* @return {string[]}
|
|
*/
|
|
export declare function getDayNamesMin(): string[];
|
|
/**
|
|
* Get a list of month names (full names)
|
|
*
|
|
* @return {string[]}
|
|
*/
|
|
export declare function getMonthNames(): string[];
|
|
/**
|
|
* Get a list of month names (short names)
|
|
*
|
|
* @return {string[]}
|
|
*/
|
|
export declare function getMonthNamesShort(): string[];
|
|
export {};
|