Internationalization and Localization
by Tomas Lazaro · in Torque Game Builder · 02/05/2011 (9:15 pm) · 0 replies
Quote:Internationalization corresponds to the design and development of a product, application or document, that allows easy localization for target groups, that vary in culture, region or language.
Quote:Localization refers to the adaption of a product, an application or a document to correspond to the language, cultural or other requirements of a specific target market (a local "scene").
I was not able to find information on Internationalization in Torque. I mean preparing my application so it can later be Localized.
Internationalization
I'm used to having all my text in an UTF8 file and always refer to by variable so we can easily provide different text bundles for a given language. But that's no just it, several times text is hardcoded into images.
We have a system where all our resources get packaged into custom .dat files. Files that we want to internationalize be it text, images, videos, sound, any file we are put into a language pack .dat, one for each language, then the game can be distributed with one or several languages.
From the game at runtime when referring to a resource we don't care about the current language, we just request for "title.png" and it will return the one in the current language.
Localization
The most painful about Localization is text and fonts. Torque support UTF8 but that is just the beginning. I have no idea how text is done in Torque.
The usual problems are:
1) Some texts in one language occupy a different area in other languages, most of the time text in German is longer than English, Asian languages also have some trouble regarding area.
2) Fonts don't support all languages. I ran into trouble doing Russian localization as it was really hard to find good fonts matching the style of the ones I used in other languages, sometimes some font were missing special characters used in French, German, etc
I use 2 tricks to solve this:
1) I define text as a rectangle marking the maximum area it can occupy. Text that is put there adjusts font size automatically in runtime every time the text changes, it starts with the font size I chose and if it ends up being larger than the area it starts to lower the font size until it fits.
2) We use 'Themes' defined in external files that gather all the text properties including font, style, alignment, size and color. We never refer to fonts directly. The Themes can be defined per language so we can easily define specific fonts and adjust sizes if needed.
Questions
In Torque, how do you take on Internationalization and Localization given this issues I mentioned?
Thanks!
About the author
Professional Game Developer/Programmer