Packagenet.guttershark.managers
Classpublic final class LanguageManager

The LanguageManager class manages loading different language xml files, and handles updating your text fields with text for a different language. This is really only used when languages need to be changed at runtime.



Public Properties
 PropertyDefined by
  languageCode : String
[write-only] Set the language code to currently use.
LanguageManager
Public Methods
 MethodDefined by
  
addLanguageXML(langXML:XML, langCode:String):void
Add an XML instance as a language XML file.
LanguageManager
  
addLocalizableClip(clip:LocalizableClip, textID:String, updateOnAdd:Boolean = false):void
Add a localizable clip to the language manager.
LanguageManager
  
getTextForID(textID:String):String
Get the text associated with an id in the current selected language xml file.
LanguageManager
  
[static] Singleton Access.
LanguageManager
  
loadLanguage(langXMLPath:String, langCode:String):void
Load a language XML file - the loading is handled internally.
LanguageManager
  
Remove a localizable clip from the manager.
LanguageManager
  
updateAll():void
Update all LocalizableClip's in this manager.
LanguageManager
Property detail
languageCodeproperty
languageCode:String  [write-only]

Set the language code to currently use. This triggers an update to all localizable clips that are registered.

Implementation
    public function set languageCode(value:String):void
Method detail
addLanguageXML()method
public function addLanguageXML(langXML:XML, langCode:String):void

Add an XML instance as a language XML file.

Parameters
langXML:XML — The XML to use for this language.
 
langCode:String — The language code to categorize this XML as.
addLocalizableClip()method 
public function addLocalizableClip(clip:LocalizableClip, textID:String, updateOnAdd:Boolean = false):void

Add a localizable clip to the language manager. The clip will be updated when the selected language code changes.

Parameters
clip:LocalizableClip — An LocalizableClip.
 
textID:String — String ID in language xml file.
 
updateOnAdd:Boolean (default = false) — Boolean to update localizedText on add.

See also

LocalizableClip Class
getTextForID()method 
public function getTextForID(textID:String):String

Get the text associated with an id in the current selected language xml file.

Parameters
textID:String

Returns
String
gi()method 
public static function gi():LanguageManager

Singleton Access.

Returns
LanguageManager
loadLanguage()method 
public function loadLanguage(langXMLPath:String, langCode:String):void

Load a language XML file - the loading is handled internally.

Parameters
langXMLPath:String — A path to a language xml file.
 
langCode:String — A language code to store this XML file as.
removeLocalizableClip()method 
public function removeLocalizableClip(clip:LocalizableClip):void

Remove a localizable clip from the manager.

Parameters
clip:LocalizableClip — The LocalizableClip to remove.
updateAll()method 
public function updateAll():void

Update all LocalizableClip's in this manager.