Game Development Reference
In-Depth Information
Last-Minute Localization
OnoneprojectIworkedon,alloftheuserinterfacewascreatedusinga
scripting language. Throughout development, no one really considered
localization. The result of this was that all of the text that was to be
displayed onscreen was hard-coded into the scripts. When it was time
to localize, no one wanted to manually go through and change all the
strings in the script files into keys. So an idea was hatched: the English
strings in the scripts were made into the keys for the localization dic-
tionary, and then the values were set in external files for each language.
This worked, but there was one little problem: If someone changed a
string in the script file, not knowing there was now a localization sys-
tem, that string would no longer function properly. That's because the
localization file would not have the new English string listed in it. This
caused some headaches on the project, and certainly is not a recom-
mended approach for most games. It's a cautionary tale as to why plan-
ning for localization is important, even if there are no immediate plans
to localize a particular game.
Most games that need to support different writing systems end up using the
Unicode character set. There are multiple ways to encode Unicode characters, but
the most popular is arguably UTF-8, which is a variable-width encoding. Standard
ASCII characters are only one byte in UTF-8, whereas Unicode characters can be
two to six bytes. Due to this variable width, assumptions about the size of strings
in memory cannot be made with UTF-8 because the size will vary from language
to language.
Butchangingthetextstringsandcharacterencodingarenottheonlythingstocon-
sider. One issue is that certain languages have lengthier words than others. One
language that is commonly localized for is German; it turns out that the average
German word is longer than the average English word (I could not find a reput-
able article on the exact numbers, but I think 20%-25% longer is a decent rule of
thumb). This means that if there's a UI element that barely fits the text in English,
it has a good chance of not fitting in other languages. These types of issues can be
frustrating to fix, because they may require changing art assets months after they
were to have been finalized. But this is one problem that consistently comes up
late in the localization process. Figure 10.10 illustrates a button in English and a
few other languages (translations courtesy of Google).
Search WWH ::




Custom Search