views:

232

answers:

3

I have a Flash project that I'm working on that will eventually need to be ported to multiple languages.

My approach was going to be to load an XML file that held the localization information, much like the resource files in ASP.NET

I was wondering if there is a better approach to this, or if this is going to be the most straight forward way.

This project is in Action Script 3, and I believe all the international languages will be left to right, however I'm not positive about that.

Thanks.

+2  A: 

Have you looked at resource modules?

dirkgently
+1  A: 

Instead of rolling your own, you might also want to consider using Gettext for the job.

Gettext supports features like variables within sentences or pluralization and is rock-solid. Localized resources are compiled, so nobody can tamper with them. Plus, you can use tools like Poedit for translating your files / checking someone else's translation and making sure that all strings are properly translated and still up to date in case you change the underlying source code. I've tried both rolling my own and using Gettext instead and I have to say that Gettext plus PoEdit were way superior.

There is also a free Gettext reader for Flash.

Adrian Grigore
A: 

If you're gonna be using LTR languages such as Hebrew, you better be using Flash CS4, or you will have to save a reversed version of each string.

Actually Hebrew is right to left and the languages I'll be using are left to right, so I hopefully won't run into any issues there.
Ryan Smith