views:

1412

answers:

6

I am aware of the built-in 'Strings' panel within the Flash IDE, however is this the best way to go about creating a multi-lingual AS3 site/application nowadays?

Are there any recommended 3rd party APIs/frameworks available? Ideally I'd like to be able to change language on the fly and support as many character sets as possible, I will also be dealing with both static and dynamic text content.

I would also like to achieve this without using Flex.

Any suggestions would be appreciated - thanks.

+1  A: 

If you're open to using Flex, Flex 3 has the ability to create resource bundles for each locale. - there's more info here: http://www.herrodius.com/blog/123

If not, I usually just end up creating giant xml files with all the text content, and a fonts.swf, but I guess this isn't much different from using the Strings panel.

quoo
+1  A: 

As far as actionscript 3 goes the only 3rd party API I use is PureMVC also you might want to take a look at swiz framework if your open to Flex 3. It uses the IoC pattern and I think it will be a lot like spring so you may be able to inject your character sets which would be something interesting. The swiz framework is really new though and I haven't had a whole lot of time to look at it.

Patrick
A: 

This is a vast topic to cover in a few paragraph answer, so I will try and point you in the right direction.

Robert Taylor of FlashExtentions.com has done a few talks on this subject. I would suggest taking a look at his Session notes. Make sure to download the Workbook summary PDF, and the Materials ZIP on Multilingual Flash Applications. Those will give you a good understanding of the topic. The examples are in AS2 but I don't really see your question as language based, but rather a general software architecture problem.

Fonts are quite a big issue when dealing with other languages so check out WestBrents answer on this post

Hope that helps.

TandemAdam
+2  A: 

How I work is to have an xml file with all my copy in it, which I use to populate a Translation singleton class. Then in each ui class I have a public translate() method which gets the appropriate content from the Translation class and displays it. You can call the translate() method in the constructor and any time you want to change the copy. You can also listen to a CHANGE event on Translation and call translate again if the text changes.

Iain
A: 

I used properties files (flex built in localization) for static text and database for dynamic text and everything worked properly.

The only issues I had were:

  • converting the translations into the right character encodings. I used Notepad++ to do this and I found and lost a better batch tool for this
  • sizing - not suprisingly some languages are a lot longer than others
Brandon
A: 

splinkresource might be what you are looking for