January 21, 2004

Developing and designing multilingual applications

Here's a topic that I've wanted to write something up on for a while now. Working in Japan I've had a lot of chances working in teams or the head of team developing and designing multilingual applications. Thinking of just one language for an app is not so bad I think. You accomodate in the design the right amount of space to put in the text you want to show. All your strings are relatively static so you don't have to put too much thought into what's going to be placed in and it's quite easy to get a decent layout going. This is where the difficulty of multilingual applications come in.

The one thing I have found up until this point is incompatibility with a certain language of an OS, or applications that only support one language (which are only too often...) If any of you have used After Effects, you would know that you can choose which language you want to install it in. This is close to my idea of an ideal multilingual application. To make it one step better, it would be best if you could change languages on the fly. FlashMX2004 is absolutely horrible in this way as you can't install 2 versions of the app anymore (even if you have licenses) on one computer which means it is FOREVER English or Japanese or whatever language you have bought. From what I understand, even if you uninstall one and install the other it won't work but I haven't tested this myself. This is the third worse situation, the second worst would be that there just isn't the language your are looking for so you settle for English (this sucks..). Last of all, the worst would be that there isn't anything but English, so you settle for it, but it doesn't read 2 byte characters so you only have the alphabet to work with, which means you can't even render out text in your own language...

While working on a new application we had decided that the application must support language changing on the fly. The world is too closely knitted together now, thanks to the internet, to only support English. If you do that, you have already cut out a HUGE chunk of customers that don't want to work with English apps (there are a lot of people who disdain English apps... trust me) If you want to use it in English, you change it to English, need it in Japanese, then just change it over. The interface changes up nicely, all the fonts change and the font size adjusts to a new size to fit the font that has been set up for that language. This is where Flash excels! I can't imagine doing something like this in html as just messing with the fonts alone would cause the page to reload... either way this isn't a web based app. But the ability to just change a language up at the push of a button is a nice feature I think.

To do this, we took advantage of the textFormat method and just made sure to set the fonts and sizes properly. Then it's just a matter of telling all the text boxes to switch over to the new language and then subsitute the strings with the appropriate words. With the ability to read in XML as well, it's simple enough to keep on adding languages for when the user base grows out of your own locale.

If you have never worked on an app that uses more than one language in it's interface, I stronly suggest giving it a try. Find a team you can join or come up with your own application maybe. There is a lot of knowledge that can be gained from the experience and it makes you look at application des/dev in a completely new way. Though the one thing I have found hardest is conforming things to match up grammatically correct. Though with some heavy planning in the beginning it's not too big of hurdle to jump over.

Definitely worth the experience though, and not only that, going back to one language apps is almost boring in a way because you have no need to implement different types of tricks and fixes to get around the interface going all weird on you when you switch over.

Posted by Graeme at January 21, 2004 11:06 AM
 



Comments

Hi Graeme,

You're misunderstanding the localization architecture of Flash MX 2004. You don't need to have two installations to have multiple languages; you can have ONE installation that supports multiple languages, and save yourself some disk space.

On Windows, take a look at your Program Files folder for Flash MX 2004... there is an "en" directory. This is where all of the English resources and collateral files are stored. If you install another language, another subdirectory is created for that language. For instance, if you install Japanese, there will be a "ja" subdirectory containing the Japanese resources and collateral.

The actual binary, flash.exe, is exactly the same for all the languages that the product supports, so there is no need to have a completely separate installation.

Once you have multiple languages installed, Flash will auto-detect which language to use based on your system code page setting. Or, you can manually override what language you want to use with one registry setting:

My Computer\HKEY_CURRENT_USER\Software\Macromedia\Flash 7\Settings\Language

Just set that key to the ISO639 language code of the language you want to use, "en", "ja", "fr", etc.

On Macintosh, there is a similar localization architecture using the MacOS X concept of bundles. If you install additional languages, the additional language assets will go into the Flash bundle.

Flash MX 2004 also is the first version of Flash that is fully Unicode. So, even if you're using the English version, you can author for multiple languages like French and Japanese within the authoring environment without changing your system code page. There's no need to use the Japanese version to author Japanese text. And because it's Unicode, there's no trysting with multiple language encodings... French, Japanese, Thai, whatever can happily coexist in one movie.

Flash MX 2004 also has the Strings Panel, which is a multilingual authoring facility for your own Flash applications. It uses XLIFF, a XML-based localization file format. There is also an ActionScript 2 class, mx.lang.Locale, which is used by the Strings Panel and provides a mini string resource system for SWF's.

Gary Grossman
Macromedia Flash Team

Posted by: Gary Grossman at January 21, 2004 11:49 AM

Hi Gary, thanks a lot for the indepth post!! Much appreciated. I got my information from my partner who talked to somebody at MM (maybe MM japan...going to have to check) so somebody has the wrong info somewhere.

This is extremely interesting information and I'll have to post this on my forum too as there were a few people looking into this a while back and were dissappointed. But if it's so easy to install different languages why didn't you just support that in one install? Then we wouldn't have to buy two versions just to have the best of both worlds. Guess I could just copy somebody elses and put it in. Is that illegal? Seems a bit of rip off to have to buy two licenses to get two languages when it's the same exe file...

Is this info somewhere on MM's site?

Posted by: Graeme at January 21, 2004 12:35 PM

Hello Gary,

I would be the partner ;)

I originally contacted MM sales when 2004 was first announced and was not yet on the shelf, as there was information out at the time that you would not be able to enter multibyte characters in the English version of Flash MX 2004. I contacted sales to confirm this, explaining that I worked with the English version of Flash on a Japanese OS and inquired if I would now have to buy the Japanese version in order to author documents containing Japanese. The support person that responded said that I would need the Japanese version... which frankly had me sort of pissed at the time. However, by the time 2004 was released for sales, the information regarding the multibyte restriction had vanished (which I am extremely thankful for).

I will see if I can find the original email, however I have replaced my computer since that time, so may no longer have it archived.

Posted by: Kris at January 21, 2004 03:04 PM

yes its always best to use unicode for any g11n app but do i understand you correctly that flashmx now fully supporrts BIDI?

Posted by: PaulH at January 21, 2004 03:08 PM

Hi Graeme,

There isn't support for installing multiple languages in one install step for a few reasons.

#1: We stagger the release of the different language releases. We support Flash on 9 different languages, so it would be very difficult to get all the localization work done and sim-ship them. We sim-shipped English/French/German/Japanese for Flash MX, and it was a real headache! Our release schedule for Flash MX 2004 looked like this:

9/8 English
10/22 French, German
10/29 Spanish, Italian, Japanese
11/5 Traditional Chinese, Simplified Chinese, Korean

#2: There aren't many customers who want to have the UI in multiple languages. Customers want to *author* multilingual content with Flash, but with Flash MX 2004, you don't need a specific language installation to do that. You can author Japanese or Chinese content just as well in the English version as you can in the specific language versions. The language versions are really just about the language used for the UI.

At the MAX 2003 keynote, our Japanese product manager demonstrated a new site (http://www.bfp.co.jp/lifewithdvd) created by a Japanese customer with Flash MX 2004, and our president, Norm Meyrowitz, made a joke that "They did that, and the product hasn't even shipped there yet!" Well, that's because the customer was able to use the English version of the product just fine to author that Japanese content.

I don't know what our policy is for having a multiple-language installation; I'll ask our product management team about it.

Kris: We did end up having some bugs specific to double-byte languages in the 9/8 release of Flash MX 2004, that resulted in problems with entering Japanese text. For that reason, the "multi-byte restriction" warning that you saw was posted.

In the end, we released the 7.0.1 updater, which fixed all of the multi-byte bugs that were known to exist in the original release of Flash MX 2004, in addition to many other bugs.

Like I said, the flash.exe for English is the same flash.exe used for Japanese, so they have the exact same multilingual authoring support. For a couple months, though, between 9/8 and the Updater release on 11/5, this wasn't true. Now that the 7.0.1 updater is out, all the int'l releases of Flash are using the same binary. Make sure you have the 7.0.1 updater installed and everything should be great!

To answer PaulH's question, Flash MX 2004 is a Unicode application, but the one thing it doesn't support is bidirectional text. So, Hebrew and Arabic are still not well-supported. We are interested in adding bi-di support in a future release.

Gary

Posted by: Gary Grossman at January 23, 2004 05:19 AM

Is it possible to set a locale for a particular movie rather than it automatically detecting the system locale. For instance I would like to create a movie that works in multiple languages based on a decision made by the user on the intro screen of the movie.

Regards,

Phil.

Posted by: Phil at March 11, 2004 07:07 PM

Yes Phil that shouldn't be much of a problem. Though you will have to set up all of the fonts, font sizes, and words that you will you use throughout the app before hand in a setLanguage function or something. To set all the fonts you would just make sure to put all the paths and instance names to all the text objects (all dynamic) in an array and then go through that array and set the textFormat to whatever language you need it to be. Am I catching your question right?

Posted by: Graeme at March 11, 2004 08:37 PM

I was actually wondering whether it is possible to utilise the Strings panel/Internationalisation functionailty built into flash without changing the system locale or registry setting.
It would be nice to be able to do something like _root.setLocale("fr") when the user chooses a particular option.
If this is not possible then I could effectively copy the String panel functionality (storing all my strings in xml) and loading the appropriate file. The thing is that I like that fact that you can develop in a single language and have flash manage the other language files.

Posted by: Phil at March 12, 2004 07:08 PM

ahh.. I see what you mean. No I don't think something like that is possible, but I have done your second suggestion and recommend it as quite good at getting what you need done. (works for me :) )

Posted by: Graeme at March 12, 2004 10:54 PM