Xml file format for multilanguage text – Adobe Flash Professional CC 2014 v.13.0 User Manual
Page 301

import mx.lang.Locale;
Locale.setFlaName("
Locale.setDefaultLang("langcode");
Locale.addXMLPath("langcode", "url/langcode/flaname_langcode.xml");
Note: The ActionScript code that the Strings panel generates does not use the Locale.initialize function. Decide how to call this function based on
the language detection customizations your project requires.
Use custom language detection
To access the language XML files to control text replacement at a time that you designate, create your own custom component or use ActionScript
code. For example, you might create a pop-up menu that lets users select a language for viewing content.
For information on writing ActionScript code to create custom language detection, see About the Strings panel in
1. Select Window > Other Panels > Strings, and click Settings.
2. In the Default Language menu, select the default language.
This must be a language you added as an available language.
3. Select the Replace Strings Via ActionScript check box, and click OK.
Flash Professional generates the following ActionScript code, which stores the language XML file paths. Use this code as a starting point for
your own language detection script.
import mx.lang.Locale;
Locale.setFlaName("
Locale.setDefaultLang("langcode");
Locale.addXMLPath("langcode", "url/langcode/flaname_langcode.xml");
Note: The ActionScript that the Strings panel generates does not use the Locale.initialize function. Decide how to call this function based on the
language detection customizations your project requires.
Additional resources
Article:
XML file format for multilanguage text
When you use multilanguage text in Flash Professional, the text is stored in XML files.
About the XML file format
Exported XML is in UTF-8 format and follows the XML Localization Interchange File Format (XLIFF)1.0 standard. It defines a specification for an
extensible localization interchange format that lets any software provider produce a single interchange format that can be delivered to, and
understood by, any localization service provider. For more information about XLIFF, see
XLIFF examples
If any of the following characters are entered in the Strings panel, they are replaced by the appropriate entity reference when written to XML files:
Character
Replaced by
&
&
'
'
"
"
<
<
>
>
Exported XML file sample
The following examples show what an XML file that the Strings panel generates looks like in the source language—in this example, English—and
in another language—in this example, French:
English source version sample:
294