Flash Localization – Which technique do you use?

Localizing SWFs at my company has become the norm. When I first started this job each language had its own SWF. This was obviously an inefficient solution as well as a maintenance nightmare.

I began mandating an XML solution utilizing one central SWF that reads a localized XML file with translations based on the visitor’s locale. Bloating due to embedded character sets is controlled by embedding only the standard Western European uppercase, lowercase, numerals and punctuation sets plus an extra locale-specific string of characters:
{|}~‘’¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶•¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿł

While this solution works well for Western European locales we’re now moving into Cyrillic and Chinese. There are a couple of options that I’m mulling over to address the issue:

  1. Use a separate SWF for each character set. One for Western European, one for Cyrillic, one for Chinese, etc.
  2. Unembed fonts for every non-Western European character set. This means throwing custom fonts away and setting all dynamic text fields to _sans for all non-Western European locales. An uglier solution than the first but easier to maintain since I’ll only have two versions of each swf.

Another issue we run into time and time again is our vendors consistently whining about which font to use. I honestly can’t believe that we’re the only company doing this yet vendors don’t seem to possess a Unicode font list that includes any font other than Comic Sans. Ugh, I can’t tell you how sick I am of seeing that font!

So my questions to you, my faithful visitors: How do you address the issue of localization? Do you use multiple SWFs? One SWF with every character set imaginable embedded in it? One SWF with no embedded fonts (_sans)?

And which fonts do you use for localization? Is there some super secret site with true Unicode fonts out there? I’ve seen plenty of fonts that claim to be Unicode but always seem to fall short of that claim.

There has to be a good solution out there somewhere….right?

-rG

12 thoughts on “Flash Localization – Which technique do you use?

  1. Use UTF-8 and you don’t need to do anything with language.
    Make sure you follow this process.
    1. Your code should be rendered as UTF-8
    Example:
    Also same thing for XML files
    2. If your are using code to build XML then use Web Services to build you data grids.
    It is faster and easy, no need to parse.
    3. Store your data in database by using Unicoded format (‘N’ prefix).
    Example: insert into table (column1, column2) values (N’My Value1′, N’My Value2′)

    Go to this link http://www.rowingru.com/videogallery_v2/main.html you will see Flex (AS3) application that uses Cyrillic text and calls database using Web Service. Also click on last tab “FISA News” and you will see RSS feeds same thing mix of English and Russian.

    If you other questions send me email agassan@vestadigital.com. I will help. 🙂

  2. Artem,

    Thanks for the info and for stopping by. As I mentioned in my post, I know how to use XML and how to use different languages in a SWF. And while I wouldn’t need to do anything with other languages if I use a non-embedded font, that’s not the case with an embedded font.

    Each character that will be presented on the screen requires that character to be embedded in the SWF for each font used in the application. I’ll be dealing with up to 60 different locales so embedding all of those characters in the same SWF would significantly add to the size of my file.

    As far as the fonts go, I’m not suggesting that my problem is Flash. I know that the fonts you mention are Unicode compliant but many of the applications we use call for a font with a little more pizazz than Arial, Verdana, Tahoma, Times Roman, Courier, or even Comic Sans.

    What I’m looking for is the most efficient way to keep my SWF size to a minimum while using the smallest number of SWFs for the largest number of languages.

    -rG

  3. Hi, I share your pain.

    I am not sure whether you are looking for an AS3 or AS3 solution. Anyway, I am currently looking for an AS2 solution.

    So far, my research has led me to http://www.casaframework.org. In principle, all fonts should have separate font libraries, and a preloader file for each of them needed for the FontManager class.

    Cheers!

    DJ

  4. What we do is have a separate font swf for each font family that we use in North America. In the development cycle this allows us to never have to worry if someone has a missing font on their machine or not. They just simply define what font they want to use in the XML and never have to mess with the fonts themselves. This gives us the option of creating “special” font swf files for other regions as well and defining them in the xml for that specific region.

    The flash movie itself only has one text field in the entire project, no matter how much text there is. Since the font is defined in the xml and not in the flash you don’t need multiple text fields. The code that manages the fonts simply looks through the xml and loads those fonts it finds when the flash loads.

    At the same time we also have the ability to un-embed all the fonts from the XML. If a region doesn’t have the fonts available it is the only method that makes sense sometimes. That is especially true with APAC. APAC character sets have some sets that have glyphs in the 19,000 character range, which makes for a heavy file.

    I have found that most producers and graphic people are willing to make the sacrifice by using un-embedded fonts for regions, simply because you get faster load times and lighter files. Which means you may have more repeat visitors because they will have to wait less.

  5. Jeff and Kelvin,
    Thanks for the comments. External font files was definitely the way I was leaning. There seem to be a lot of variations on the implementation but you’ve given me a great starting point.

    Flash 10 looks like it’s going to include a lot of improvements in the handling of text and localization but until then, external font swfs seem like the way to go.

    Thank you both,
    Glenn

  6. I have the same problem with a php response loading into a dynamic text field. The text is from a database and in bulgarian – cyrillic. The only solution I’ve found so far is that the text loads as long as it is hardwritten into the file and not taken from the database and only if the php file is saved in UTF-8 charset. I cannot change the charset of the database on my hosting server so I’m still looking for a way round this problem.

  7. Please help me to find out how to use html tag in string panel. Automated localization works fine but instead of single line break it always inserts a new paragraph (looks like two tags). Inspite of the fact that my ‘render text as HTML’ is on, it doesn’t actualy work.
    Thanks in advance.

    Mario

Comments are closed.