ActionScript 2.0 Language Reference |
|
|
|
| ActionScript classes > Locale (mx.lang.Locale) > loadStringEx (Locale.loadStringEx method) | |||
Returns the string value associated with the given string ID and language code. To avoid unexpected XML file loading, loadStringEx() does not load the XML language file if the XML file is not already loaded. You should decide on the right time to call the loadLanguageXML() method if you want to load a XML language file.
Availability: ActionScript 2.0; Flash Player 8
stringID:String - The identification (ID) number of the string to load.
languageCode:String - The language code.
String - The string value associated with the given string ID in the language specified by the languageCode parameter.
The following example uses the loadStringEx() method to trace the value of the IDS_GREETING string for the currently loaded French language XML file.
import mx.lang.Locale;
Locale.setLoadCallback(localeCallback);
Locale.loadLanguageXML("fr");
function localeCallback(success:Boolean) {
trace(success);
trace(Locale.stringIDArray); // IDS_GREETING
trace(Locale.loadStringEx("IDS_GREETING", "fr")); // bonjour
}
loadString (Locale.loadString method)
|
|
|
|