Localizer
Extends:
Localizer provides the functionality necessary to:
- pick a string translation based on language
- format dates based on locale and time zone
TODO:
- detect language, locale, and timezone
- load translations
Static Member Summary
Static Public Members | ||
public static get |
Singleton: * |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public get |
dateFieldOrder: string[]: * Different locales order their dates in various ways: mm/dd/yyyy or yyyy.mm.dd or 2012년 12월 20일 목요일 |
|
public get |
|
|
public get |
|
|
public get |
gatheredData: {"strings": *} |
|
public get |
This should NOT be turned on in production because it continuously grows in memory. |
|
public set |
|
|
public get |
monthNames: * |
Method Summary
Public Methods | ||
public |
formatDate(date: *, long: boolean, options: undefined): * |
|
public |
formatDateObject(date: *, options: *): * |
|
public |
formatDateTime(date: *, long: boolean, options: undefined): * |
|
public |
|
Inherited Summary
From class EventHandler | ||
public get |
listeners: EventListener[]: * |
|
public |
addListener(callback: function(eventName: string, eventSource: EventHandler), eventName: Object | Symbol, once: bool) |
|
public |
cleanup() |
|
public |
removeListener(callback: *, eventName: undefined) |
|
public |
trigger(eventName: *, params: ...*) Send an event to listeners |
Static Public Members
public static get Singleton: * source
Public Constructors
public constructor() source
Public Members
public get dateFieldOrder: string[]: * source
Different locales order their dates in various ways: mm/dd/yyyy or yyyy.mm.dd or 2012년 12월 20일 목요일
Return:
string[] | a length 3 array of 'day', 'month', and 'year' in the order that this locale renders date fields |
public get defaultLocales: * source
public get defaultTimeZone: * source
public get gatheredData: {"strings": *} source
public get gathering: boolean: * source
This should NOT be turned on in production because it continuously grows in memory.
public set gathering source
public get monthNames: * source
Public Methods
public formatDateObject(date: *, options: *): * source
Params:
Name | Type | Attribute | Description |
date | * | ||
options | * |
Return:
* |