Loadstringex (Locale.loadstringex Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

function checkLocaleStatus():Void {
if (Locale.checkXMLStatus()) {
clearInterval(locale_int);
trace("clearing interval @ " + getTimer() + " ms");
}
}
// callback function for Locale.setLoadCallback()
function localeCallback(success:Boolean):Void {
greeting_txt.text = Locale.loadString("IDS_GREETING");
}
See also

loadStringEx (Locale.loadStringEx method)

loadStringEx (Locale.loadStringEx method)
public static loadStringEx(stringID:String, languageCode:String) : String
Returns the string value associated with the given string ID and language code. To avoid
unexpected XML file loading,
XML file is not already loaded. You should decide on the right time to call the
loadLanguageXML()
Availability: ActionScript 2.0; Flash Player 8
Parameters
- The identification (ID) number of the string to load.
stringID:String
languageCode:String
Returns
- The string value associated with the given string ID in the language specified by the
String
parameter.
languageCode
Example
The following example uses the
string for the currently loaded French language XML file.
IDS_GREETING
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
}
loadStringEx()
method if you want to load a XML language file.
- The language code.
loadStringEx()
does not load the XML language file if the
method to trace the value of the
Locale (mx.lang.Locale)
739

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF