ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
org.osmf.utils 

OSMFStrings  - AS3 OSMF

Packageorg.osmf.utils
Classpublic class OSMFStrings
InheritanceOSMFStrings Inheritance Object

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Utility class that exposes all user-facing strings.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  resourceStringFunction : Function
[static] Function that the getString methods uses to retrieve a user-facing string.
OSMFStrings
Public Methods
 MethodDefined By
  
getString(key:String, params:Array = null):String
[static] Returns the user-facing string for the given key.
OSMFStrings
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

resourceStringFunction

property
resourceStringFunction:Function

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Function that the getString methods uses to retrieve a user-facing string.

This function takes a String parameter (which is expected to be one of the static consts on this class) and an optional Array of parameters which can be substituted into the String (formatted as {0}, {1}, etc.).

Clients can supply their own getString function to localize the strings. By default, the getString function returns an English-language String.



Implementation
    public static function get resourceStringFunction():Function
    public static function set resourceStringFunction(value:Function):void
Method Detail

getString

()method
public static function getString(key:String, params:Array = null):String

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Returns the user-facing string for the given key. All possible keys are defined as static constants on this class. The parameters are optional substitution variables, formatted as {0}, {1}, etc.

Parameters

key:String
 
params:Array (default = null)

Returns
String