@cute-dw/core
Version:
This TypeScript library is the main part of a more powerfull package designed for the fast WEB software development. The cornerstone of the library is the **DataStore** class, which might be useful when you need a full control of the data, but do not need
107 lines (106 loc) • 3.59 kB
TypeScript
import { Cloneable } from "../interface/Cloneable";
/**
* Object that represents a _Unicode_ locale identifier and is inherited from the JavaScript's `Intl.Locale` class
*/
export declare class Locale extends Intl.Locale implements Cloneable {
private static localeMap;
static get ENGLISH(): Locale;
static get FRANCE(): Locale;
static get FRENCH(): Locale;
static get CHINESE(): Locale;
static get SIMPLIFIED_CHINESE(): Locale;
static get TRADITIONAL_CHINESE(): Locale;
static get CHINA(): Locale;
static get TAIWAN(): Locale;
static get GERMAN(): Locale;
static get GERMANY(): Locale;
static get ITALIAN(): Locale;
static get ITALY(): Locale;
static get JAPANESE(): Locale;
static get JAPAN(): Locale;
static get KOREAN(): Locale;
static get KOREA(): Locale;
static get CANADA(): Locale;
static get CANADA_FRENCH(): Locale;
static get RPC(): Locale;
static get RU(): Locale;
static get UK(): Locale;
static get US(): Locale;
/** The key for the private use extension ('...-x-...') */
static readonly PRIVATE_USE_EXTENSION = "x";
/** The key for Unicode locale extension ('...-u-...') */
static readonly UNICODE_LOCALE_EXTENSION = "u";
private _fullName;
/**
* @constructor
* @param tag
* @param options
* @throws Error if incorrect locale information provided
*/
constructor(tag?: string, options?: Intl.LocaleOptions);
/**
* Gets the browser navigator's language tag
* @returns Language tag
* @static
*/
static getDefaultLanguage(): string;
/**
* Factory method that returns singleton Locale object
* @param tag A language tag
* @param options An object with some or all of options of the locale
* @returns Locale object
* @throws Error if incorrect locale information provided
* @static
*/
static of(tag: string, options?: Intl.LocaleOptions): Locale;
/**
* Locale's factory method
* @param tag A language tag
* @param options An object with some or all of options of the locale
* @returns Locale object
* @throws Error if incorrect locale information provided
* @private
* @static
*/
private static getLocale;
/**
* Gets the character that is used as the decimal point designation
* @returns Delimiter character
*/
get decimalsDelimiter(): string;
/**
* Gets the character that is used as the thousand groups delimiter
* @returns Delimiter character
*/
get thousandsDelimiter(): string;
/**
* Gets an expanded locale name in the `language-script-region` format
* @returns Expanded locale name
* @since 0.5.0
*/
get fullName(): string;
/**
* Makes a clone of the current locale object
* @returns A cloned locale object
* @since 0.5.0
*/
clone(): Locale;
/**
* Gets a string representing a Locale's extension information
* @returns Locale's extension string
* @since 0.5.0
*/
getExtension(): string;
/**
* Gets a string representing a Locale's private use extension information
* @returns Locale's private use extension string
* @since 0.5.0
*/
getPrivateExtension(): string;
/**
* Returns _true_ if this Locale has any extensions.
* @returns _true_ if this Locale has any extensions
* @since 0.5.0
*/
hasExtensions(): boolean;
}