Packagevegas.events
Classpublic class LocalizationEvent
InheritanceLocalizationEvent Inheritance BasicEvent Inheritance flash.events.Event

The LocalizationEvent is used in the Localization singleton to notify a change.



Public Properties
 PropertyDefined By
  CHANGE : String = change
[static] The name of the event when the localization is changed.
LocalizationEvent
 Inheritedcontext : *
Determinates the optional context of this event.
BasicEvent
  current : Lang
[read-only] Indicates the current Lang value of the internal Localization.
LocalizationEvent
  DEFAULT_ID : String
[static] The default singleton name of the Localization singletons.
LocalizationEvent
 Inheritedtarget : Object
[override] Indicates the custom event target.
BasicEvent
 InheritedtimeStamp : uint
[read-only] Indicates the timestamp of the event.
BasicEvent
 Inheritedtype : String
[override] Returns the type of event.
BasicEvent
Public Methods
 MethodDefined By
  
LocalizationEvent(type:String, target:Localization = null, context:* = null, bubbles:Boolean = false, cancelable:Boolean = false, time:Number = 0)
Creates a new LocalizationEvent instance.
LocalizationEvent
  
clone():Event
[override] Returns a shallow copy of this object.
LocalizationEvent
 Inherited
dispatch(channel:String = null):void
Dispatch the event with the global event flow.
BasicEvent
  
getLocale(id:String = null):*
Returns the current Local reference or the internal value of the Local property passed in argument with the string in argument.
LocalizationEvent
  
init(o:Object, sID:String = null, callback:Function = null):void
Apply the current localization over the specified object.
LocalizationEvent
 Inherited
toString():String
[override] Returns the string representation of this event.
BasicEvent
Protected Methods
 MethodDefined By
 Inherited
setTimeStamp(time:uint = 0):void
Sets the timestamp of the event (used this method only in internal in the Event class).
BasicEvent
Property Detail
CHANGEproperty
public static var CHANGE:String = change

The name of the event when the localization is changed.

currentproperty 
current:Lang  [read-only]

Indicates the current Lang value of the internal Localization.


Implementation
    public function get current():Lang
DEFAULT_IDproperty 
public static var DEFAULT_ID:String

The default singleton name of the Localization singletons.

Constructor Detail
LocalizationEvent()Constructor
public function LocalizationEvent(type:String, target:Localization = null, context:* = null, bubbles:Boolean = false, cancelable:Boolean = false, time:Number = 0)

Creates a new LocalizationEvent instance.

Parameters
type:String — the string type of the instance.
 
target:Localization (default = null) — the target of the event.
 
context:* (default = null) — the optional context object of the event.
 
bubbles:Boolean (default = false) — indicates if the event is a bubbling event.
 
cancelable:Boolean (default = false) — indicates if the event is a cancelable event.
 
time:Number (default = 0) — this optional parameter is used in the eden deserialization to copy the timestamp value of this event.
Method Detail
clone()method
override public function clone():Event

Returns a shallow copy of this object.

Returns
Event — a shallow copy of this object.
getLocale()method 
public function getLocale(id:String = null):*

Returns the current Local reference or the internal value of the Local property passed in argument with the string in argument.

Parameters

id:String (default = null)

Returns
* — the current Local reference or the internal value of the Local property passed in argument with the string in argument.
init()method 
public function init(o:Object, sID:String = null, callback:Function = null):void

Apply the current localization over the specified object.

Parameters

o:Object — The object to fill with the current localization in the application.
 
sID:String (default = null) — (optional) if this key is specified the method return the value of the specified key in the current locale object.
 
callback:Function (default = null) — (optional) The optional method to launch after the initialization over the specified object.