views:

73

answers:

2
+2  Q: 

Multilingual Flash

How do you make a Flash movie (using Haxe, or Actionscript code rather than the IDE) that supports multiple languages?

Can you detect the browser's language?

Are there utility classes for managing the strings and selecting the appropriate one based on language?

A: 

flex 3 has support for this: http://bugs.adobe.com/confluence/display/ADOBE/Flex+3+Details+-+Runtime+Localization

other than that there is nothing I know of. The Flash IDE itself also allows creating multilanguage content (at least Flash 8 did), but I guess you're better of creating your own utilities.

greetz

back2dos

back2dos
+3  A: 

the easiest way that i have found to get around this is to have seperate XML documents that provide each language string. depending on the language initialisation load the different xml file, xml_en.xml/xml_fr.xml etc... then the rest of the program is completely the same and the system is completely expandable if you need to add more later.

these files can either be loaded externally or embedded in the swf file for ease of transportation.

i always ran the language setup by passing a flashvar from the loading page. do you have access to the hoasting page?

shortstick
+1. Most people roll their own. The flash IDE does have some support for this - check the "Strings" panel - and that can be useful for simple hacks, but it doesn't scale that well.
fenomas
Also, for getting the language check out System.capabilities.language. http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/system/Capabilities.html#language
fenomas
Just mind your fonts and encode all XML in UTF-8 format.
Matt W