Adobe FLASH CS3 PRO User Manual page 290

Hide thumbs Also See for FLASH CS3 PRO:
Table of Contents

Advertisement

Publishing multilanguage FLA files
When you save, publish, or test the FLA file, a folder with an XML file is created for each available language you
selected in the Strings panel. The default location for the XML folders and files is the same folder indicated as the
SWF publish path. If no SWF publish path was selected, the XML folder and files are saved in the folder in which the
FLA file is located. For example, if you have a file named Test in the mystuff folder, and you selected English (en),
German (de), and Spanish (es) as active languages, and you did not select a SWF publish path, when you save the
FLA file, the following folder structure is created:
\mystuff\Test.fla
\mystuff\de\Test_de.xml
\mystuff\en\Test_en.xml
\mystuff\es\Test_es.xml
When you start a SWF file, you also need to start the associated XML files with the string translations in the web
server. The first frame that contains text cannot appear until the entire XML file is downloaded.
See also
"Publishing Flash documents" on page 418
Manually replace strings at publish time
Manually replace strings by using the Stage language when you publish your Flash SWF file. This method uses the
Stage language to replace all instances of input and dynamic text with an associated string ID. In this case, text strings
are only updated when you publish the SWF file; language detection is not automatic, and you must publish a SWF
file for each language to support.
Select Window > Other Panels > Strings, and click Settings.
1
2
Select the Replace Strings Automatically At Runtime check box.
Use automatic language detection with the default language
You can change the default runtime language to any language that you selected as an available language. When
automatic language detection is on, and you view the SWF file on the system that uses the language, any system that
is set to a language other than one of the active languages uses the default language. For example, if you set your
default language to English and you select ja, en, and fr as active languages, users who have their system language set
to Japanese, English, or French automatically see text strings in their chosen language. However, users who have their
system language set to Swedish, which is not one of the selected languages, automatically see text strings in the
default language you selected—in this case, English.
1
Select Window > Other Panels > Strings, and click Settings.
In the Default language menu, select the default language. This must be a language you added as an available
2
language.
To enable automatic language detection, select Replace Strings Automatically At Runtime, and click OK.
3
Flash generates the following ActionScript™, which stores the language XML file paths. Use this code as a starting
4
point for your own language detection script.
import mx.lang.Locale;
Locale.setFlaName("<flaFileName>");
Locale.setDefaultLang("langcode");
Locale.addXMLPath("langcode", "url/langcode/flaname_langcode.xml");
FLASH CS3
284
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents