Flash + Multiple Languages
- Started
- Last post
- 6 Responses
- mrbee2828
So I'm getting ready to accept a project from a client that will be presented in up to 8 different languages. The details haven't been worked out yet but I wanted to get a head start on this. I did 1 project that was presented in both Spanish and English about 2 years ago. The text came in from XML and I dealt with many headaches but ultimately pulled it off. This new one will have Japanese and Chinese for example which have a different character set. I spoke with a few native Chinese co-workers here at the office and they got me pointed in the right direction for setup.
Are there any major pitfalls I should look out for when doing the setup? From the UTF format of the XML, to having the fonts on my machine, is there anything I may not know about that has always presented an issue with Flash and XML? One thing I have learned is that the full sets for Asian languages are usually very large for dynamic fields. Thanks for ANY help in advance.
- unfittoprint0
//create a global lang variable
var lang:String = (lang == undefined)? "en" : lang;
you can add the lang var to the emebed swf object in a html/php file
or
within the flash file itself having 'choose language' menu to deploy the global lang var.
you then can add 'lang' as a suffix to your content loading procedures:
ie. myxml.load("xml_"+lang+".xml");
//or
myvars.load("txt_"+lang+".txt");//or even
myvars.load("script.php?lang="+l...
- joyride0
the data must be in UTF 8.
if you can don't use embedded text. if your worried about that. The native system will have all the characters and render them correctly. Chinese windows will interprete the characters correctly, flash uses the systems fonts or something like that.
Your problem will be allowing for growth in the text fields. most non latin based languages are longer in its written form. A general rule is expect about 40% growth. Which makes the design somewhat difficult. Lots of scrolling text boxes... makes things ugly. =(
- Rozza0
Hey!
Use system fonts for japanese & chinese.
Make sure XML is UTF8.
Invest in a decent XML editor which doesnt fuck about with the japanese and chinese encodings. (Try SC Unipad)
Allow up to double the amount of space for text
When fading images to 0, make sure to make them _visible=false otherwise they will continue to show the japanese & chinese langs.
Hope that helps
R
- mrbee28280
Thanks all. Again I've done this in the past so picking the right files/utf I'm good one. Things like messing up the XML are a good note and I assumed spacing would be a concern. All great stuff none the less and a good archive thread for NT. Thanks!
- Glassine0
Enter response: I did something like this once and ended up making one field for each line of text to deal with the changing length. Which I'm sure was the ultra retarded way to do it, but at least the layout didn't get messed up.
- ********0
tricky things: any sort of line-break animation = bad, some phrases are one line in chinese, 3 lines in german...
for asian fonts you'll need to use system fonts, you don't want to embed a whole font set of 10,000 chars.
the guys who built this backend created an .xls file that you could export out xml from, it made it easier to track different phrases in different languages.