Sunday, July 19, 2009

Creating multi-language “experiences”

Working for a company that creates content for a worldwide audience, sometimes, makes it difficult to explain how a "dynamic publish once" application works. As Flashers, we use a lot of XML to store our content and use dynamic textfields to display them. I haven't really come across many developers using the built-in Strings panel. The Strings panel is quite useful by helping you create and manage multi-lingual content. You can create the content in one language and then use the Strings panel to add more languages. When you publish the application, a folder will be created containing one XML file per language. Isn't that great?

Manually setting up a multi-lingual project isn't very complicated. The general approach to setting up such a project is as follows:

  1. Create your application root folder – For ex: MyLanguageApp
  2. Create a folder called "data" or "content". This folder will contain your XML files.
  3. Of course, you need the com/company/app path for your ActionScript package.
  4. If the user is in-charge of selecting the language, it is not a complicated affair. Else, in your main FLA, you need to have a logic that helps you make that choice. I use a server-side script that returns the system language settings.
  5. Embed fonts into your application for your dynamic textfields.

The first 4 points are easy. The final one can get a bit tricky, especially when we are talking about "brand fonts and styles". Advertising agencies select fonts to build a brand's identity, after taking into consideration a lot of brand character, strategy and not to forget...Client requirement. All brand fonts needn't support character sets belonging to some or most languages. To mimic characters for static content is easy, but, for content coming from an XML data source is tough! If the character is not supported, the user will just see "boxes" on screen. This is especially true for Asian language sets and some EMEA languages. Creating a campaign font from the scratch is time consuming, but, well worth it if your brand font doesn't support the characters!

Some tips to create multi-lingual application:

  • Organize the data into folders with file names reflecting languages. For example, use en-US for US English.
  • Try to select the language for the user by sniffing his IP Address. If the selection needs to be manual (by the user), make sure you have a page at the beginning to allow the user to do so.
  • Make sure you embed all fonts and characters.
  • Most importantly, use a formula to calculate the textfield's height and width depending on the content loaded.
  • Also check to see font size for your content. It is ideal to set it using ActionScript.
  • Make sure your application is fully loaded before the content is shown.

From my experience, Arial and certain fonts belonging to the Helvetica family are good fonts to have embedded for displaying multi-lingual content. I am currently experimenting with Segoe.

Leave me comments if you have any specific words of advice or experiences. It should form a good source for people involved in creating multi-lingual content.

 

2 comments:

ciMpLy KJ said...

Nice article dude .. wish people could follow atleast a small %age of it .. u know what am talkin about ..

Unknown said...

nice post



_______________________
http://www.magicram.com