Packagexp.locales
Classpublic class LocaleManager
InheritanceLocaleManager Inheritance flash.events.EventDispatcher



Public Properties
 PropertyDefined by
  availableLocales : Array
LocaleManager
  defaultLocale : *
LocaleManager
  rootURL : String
The URL that the LocaleManager should use when computing relative URLs of Locales to be loaded.
LocaleManager
Public Methods
 MethodDefined by
  
Create a Locale Manager instance.
LocaleManager
  
addLocale(locale:*):void
Adds locale to the current application
LocaleManager
  
getLocale(name:* = null):Locale
[static]
LocaleManager
  
getLocaleArray(key:String):Array
Get a localized array from the current default locale
LocaleManager
  
getLocaleBoolean(key:String):Boolean
Get a localized boolean from the current default locale
LocaleManager
  
getLocaleData(locale:Locale = null):LocaleData
Gets the localeData object for the given locale
LocaleManager
  
getLocaleInt(key:String):int
Get a localized int from the current default locale
LocaleManager
  
[static] Returns the static instance of the LocaleManager
LocaleManager
  
getLocaleNumber(key:String):Number
Get a localized number from the current default locale
LocaleManager
  
getLocaleString(key:String):String
Get a localized string from the current default locale
LocaleManager
  
startLoader():void
Restarts the locale loader if it had stopped on an error
LocaleManager
Events
 EventSummaryDefined by
    LocaleManager
Property detail
availableLocalesproperty
availableLocales:Array  [read-write]Implementation
    public function get availableLocales():Array
    public function set availableLocales(value:Array):void
defaultLocaleproperty 
defaultLocale:*  [read-write]

This property can be used as the source for data binding.

Implementation
    public function get defaultLocale():*
    public function set defaultLocale(value:*):void
rootURLproperty 
rootURL:String  [read-write]

The URL that the LocaleManager should use when computing relative URLs of Locales to be loaded. The relative URL is computed automatically based on this value. If not set explicitly _rootURL is automatically set to the location of the SWF running this application.

Implementation
    public function get rootURL():String
    public function set rootURL(value:String):void
Constructor detail
LocaleManager()constructor
public function LocaleManager()

Create a Locale Manager instance. If this is the first instance it will also become the global LM.

Method detail
addLocale()method
public function addLocale(locale:*):void

Adds locale to the current application

Parameters
locale:* — - a locale object
getLocale()method 
public static function getLocale(name:* = null):LocaleParameters
name:* (default = null)

Returns
Locale
getLocaleArray()method 
public function getLocaleArray(key:String):Array

Get a localized array from the current default locale

Parameters
key:String

Returns
Array — The localized value
getLocaleBoolean()method 
public function getLocaleBoolean(key:String):Boolean

Get a localized boolean from the current default locale

Parameters
key:String

Returns
Boolean — The localized value
getLocaleData()method 
public function getLocaleData(locale:Locale = null):LocaleData

Gets the localeData object for the given locale

Parameters
locale:Locale (default = null) — - the id or name of a locale (id=en_US, name=en-US)

Returns
LocaleData — the localeData for the given locale
getLocaleInt()method 
public function getLocaleInt(key:String):int

Get a localized int from the current default locale

Parameters
key:String

Returns
int — The localized value
getLocaleManager()method 
public static function getLocaleManager():LocaleManager

Returns the static instance of the LocaleManager

Returns
LocaleManager
getLocaleNumber()method 
public function getLocaleNumber(key:String):Number

Get a localized number from the current default locale

Parameters
key:String

Returns
Number — The localized value
getLocaleString()method 
public function getLocaleString(key:String):String

Get a localized string from the current default locale

Parameters
key:String

Returns
String — The localized value
startLoader()method 
public function startLoader():void

Restarts the locale loader if it had stopped on an error

Event detail
changeevent 
Event object type: xp.events.LocaleEvent