Package | com.adobe.xmp.utils |
Class | public class ZStringManager |
Algorithm:
Usage:
Method | Defined by | ||
---|---|---|---|
addString(key:String, value:String):void
[static]
Adds a ZString key-value pair to the dictionary
for the current locale.
| ZStringManager | ||
addZStrings(file:String, bundleInfo:String = null):void
[static]
Parses a translation dictionary file and makes
the ZStrings available to the File Info dialog.
| ZStringManager | ||
contains(key:String):Boolean
[static]
Reports whether a key is contained in the translation
dictionaries available to the File Info dialog.
| ZStringManager | ||
getDictionaryFrom(key:String, sort:Boolean = false, caseSensitive:Boolean = false, descending:Boolean = false):ArrayCollection
[static]
Handles special ZStrings that descibe a list of label-data pairs
for the drop-down list of a combo box.
| ZStringManager | ||
getLocale():String
[static]
Retreives the current locale
| ZStringManager | ||
getString(key:String, parameters:Array = null):String
[static]
Main localization method, returns a translated display string.
| ZStringManager | ||
isZString(str:String):Boolean
[static]
Reports whether a string is a valid ZString.
| ZStringManager |
Constant | Defined by | ||
---|---|---|---|
DEFAULT_LOCALE : String = "en_US" [static] The default locale
| ZStringManager |
addString | () | method |
public static function addString(key:String, value:String):void
Adds a ZString key-value pair to the dictionary for the current locale.
Parameterskey:String — The new ZString key.
|
|
value:String — The new ZString value.
|
addZStrings | () | method |
public static function addZStrings(file:String, bundleInfo:String = null):void
Parses a translation dictionary file and makes the ZStrings available to the File Info dialog.
Parametersfile:String — The translation dictionary file.
|
|
bundleInfo:String (default = null ) — Optional, for internal use.
|
contains | () | method |
public static function contains(key:String):Boolean
Reports whether a key is contained in the translation dictionaries available to the File Info dialog. Default values included in the key are ignored.
Parameterskey:String — The ZString key.
|
Boolean — True if the key is available.
|
getDictionaryFrom | () | method |
public static function getDictionaryFrom(key:String, sort:Boolean = false, caseSensitive:Boolean = false, descending:Boolean = false):ArrayCollection
Handles special ZStrings that descibe a list of label-data pairs
for the drop-down list of a combo box. This method provides compatability with
CS3 strings, and must be used
key:String — The ZString key.
|
|
sort:Boolean (default = false ) — Sort uppercase letters first.
|
|
caseSensitive:Boolean (default = false ) — Sort descending, while ascending is default.
|
|
descending:Boolean (default = false )
|
ArrayCollection — An array of translated strings.
|
getLocale | () | method |
public static function getLocale():String
Retreives the current locale
ReturnsString — The current locale code, or "x-default"
if no locale has been explicitly set.
|
getString | () | method |
public static function getString(key:String, parameters:Array = null):String
Main localization method, returns a translated display string.
Parameterskey:String — The ZString key value.
|
|
parameters:Array (default = null ) — Optional, an array of 1-9 values with which to replace
variables ^1-^9 in the retrieved string.
|
String — The translated string (the value matching the key in the
dictionary for the current locale), or if no match is found, the
display-string portion of the ZString itself, with supplied parameter
values substituted for variables.
|
ZStringManager.getString('$$$/AWS/FileInfoLib/Dialog/MultiFileEdit=Multiple files are currently selected')
isZString | () | method |
public static function isZString(str:String):Boolean
Reports whether a string is a valid ZString.
Parametersstr:String — The string.
|
Boolean — True if the string is a valid ZString.
|
DEFAULT_LOCALE | constant |
public static const DEFAULT_LOCALE:String = "en_US"
The default locale