@eclipse-scout/core
Version:
Eclipse Scout runtime
33 lines • 1.48 kB
TypeScript
import { DateFormat, DateFormatSymbols, DecimalFormat, DecimalFormatSymbols, InitModelOf, LocaleModel } from '../index';
export declare class Locale implements LocaleModel {
model: LocaleModel;
languageTag: string;
/**
* The language part of the {@link languageTag}, e.g. `"en"` or `"de"`.
* This value is automatically derived from the language tag when constructing a Locale instance.
*/
language: string;
/**
* The country part of the {@link languageTag}, e.g. `"US"` or `"CH"`.
* This value is automatically derived from the language tag when constructing a Locale instance.
*/
country: string;
displayLanguage: string;
displayCountry: string;
decimalFormatPatternDefault: string;
decimalFormatSymbols: DecimalFormatSymbols;
decimalFormat: DecimalFormat;
dateFormatPatternDefault: string;
dateFormatSymbols: DateFormatSymbols;
timeFormatPatternDefault: string;
dateFormat: DateFormat;
constructor(model?: InitModelOf<Locale>);
/**
* Creates a new {@link Locale} based on given input. If no input is given, the default Locale is returned (en-US).
* @param locale The locale or null for the default locale.
* @returns the given Locale, a new Locale based on the model given or the default Locale if the input is null.
*/
static ensure(locale?: Locale | InitModelOf<Locale>): Locale;
static DEFAULT: LocaleModel;
}
//# sourceMappingURL=Locale.d.ts.map