Packagestarlingbuilder.engine.localization
Classpublic class DefaultLocalization
InheritanceDefaultLocalization Inheritance Object
Implements ILocalization

Default implementation of ILocalization

See also

ILocalization
Using Localization


Public Properties
 PropertyDefined By
  locale : String
Current locale property.
DefaultLocalization
Public Methods
 MethodDefined By
  
DefaultLocalization(data:Object, locale:String = null)
Constructor
DefaultLocalization
  
getKeys():Array
Get all the available keys (only used in the editor).
DefaultLocalization
  
getLocales():Array
Get all the available locales (only used in the editor).
DefaultLocalization
  
getLocalizedText(key:String):String
Get localized text from key
DefaultLocalization
Property Detail
localeproperty
locale:String

Current locale property.


Implementation
    public function get locale():String
    public function set locale(value:String):void
Constructor Detail
DefaultLocalization()Constructor
public function DefaultLocalization(data:Object, locale:String = null)

Constructor

Parameters
data:Object — localization data
 
locale:String (default = null) — current locale
Method Detail
getKeys()method
public function getKeys():Array

Get all the available keys (only used in the editor). Only used in editor.

Returns
Array — array of keys
getLocales()method 
public function getLocales():Array

Get all the available locales (only used in the editor).

Returns
Array — array of locales
getLocalizedText()method 
public function getLocalizedText(key:String):String

Get localized text from key

Parameters

key:String — key of the text

Returns
String — localized text