This class represents a map of locales and their associated strings. Each string can be accessed by using the locale as the key (e.g. 'en', 'jp'). localString and setGlobalLocale can be used to automatically access a preferred locale.

Example

var locStr;
locStr['en']; // English String
LocalizedString.setGlobalLocale('jp');
locStr.localString; // Japanese String

Hierarchy

  • LocalizedString

Implements

Indexable

[x: string]: string

Constructors

Properties

Accessors

Methods

Constructors

Properties

globalLocale: string = 'en'

Accessors

  • get localString(): string
  • The string associated with the current global locale (set with setGlobalLocale()). If the global locale is not available for this string, the English string is returned. If that is also unavailable, the next available locale is returned. If no locales are available, an empty string is returned.

    Returns string

Methods

Generated using TypeDoc