Software Localization

A Programmer's Guide To Foreign Languages
By Patrick Dowling
Gamasutra
August 28, 1998
Vol. 2: Issue 34


Game Developer Magazine
originally published
May, 1998

Software Localization
The Four Steps To World Domination

A Programmer's Guide to Foreign Languages

"T" Time: Text and Translation

Visuals

Talkin' The Talk

Wrapping It Up

Depending upon the nature of the game, the programmer may not need to code with future localization efforts explicitly in mind -- as long as that programmer is organized and keeps the data separate from the code. Storing text within the code is ill-advised, as it makes the text very difficult to collect. Your localization people could very easily miss whole portions. With all the strings in a string table -- even the system provided by Windows -- replacing all of your game's text is a simple matter. The task doesn't even require a programmer.

From a programmer's point of view, graphics and sound files can be in any language -- besides, perhaps, the varying length of the text. The simplest way to cope with variations in the length of a line of spoken text is to have the speak animation run until the text file has ended. Alternatively, you can have the program read the file's length beforehand. Both approaches are easy to implement. One nameless and unreleased adventure game used the following system for spoken text: Once the script was complete, the script writer timed himself speaking the text (I swear it's true) and passed this information on to the artist and programmer, who then constructed an animation that would run for that length of time -- for all 250 pages of script. Then the script changed. What was that bit about "common sense?"

That said, there are three instances in which the programmer needs to be careful when handling text: display, input, and manipulation.

Display. Some languages (many languages, actually) use more characters than English, not to mention languages that use completely different character sets. The German characters ä, ö, ü and ß can be replaced with ae, oe, ue and ss, but this really looks unprofessional. And you really can't replace the accents in French. In the age of Windows, these character discrepancies are less of a problem, but nonetheless something to keep in mind if you're using your own font and text-display routines. You should try to adhere to some standard for these characters, so the text files won't need conversion or extra work. It is worth noting at this point that number formats vary as well (Table 2).

Table 2. International number formats.
  USA Other
Dates MM/DD/YY DD/MM/YY
Numbers 1,000.25 1.000,25
Time 1:00 pm 13:00


Input. A similar problem arises when you need input from the user. One oversight has probably generated more frustrated users and calls to hotlines than anything else: keyboard layouts. I can think of at least one installation program in which you couldn't change the installation drive -- not because the program didn't let you, but simply because you can't enter the [\] character on a German keyboard. Similarly, Yes and No don't always start with a Y or an N; the French prefer Oui and Non, the Germans Ja and Nein. At the very least, try to ensure that these simple functions work -- for more complex key layouts, making certain that the localized manual lists the correct keys for that locale should be sufficient.

Manipulation. If you're trying to localize a game that involves some form of text manipulation that goes beyond simple retrieval, then you may have bitten off more than you can chew. Trying to build sentences from individual words is relatively simple with the familiar English grammar. The results of trying to transfer this familiar system directly to a foreign language range all the way from hilarious to bizarre to, well, completely embarrassing. Anyone who has ever tried to learn a foreign language will remember the difficulties: word order is often completely different, and even if the order is the same, the meaning may be completely different. One might assume that half-three means three-thirty, but halb drei in German is two-thirty. Not to mention those blasted articles and their declensions. Take German, for example (not for extra credit): usage of the three articles der, die, and das depend on the gender of the object. Each article and noun has four cases (plus plural), and usage of the different cases depends on where the word is used in the sentence. Is it the direct object? The indirect object? The subject? What pronoun is being used with it?

Punctuation also varies from language to language. Whereas in English the punctuation is connected to the previous word, the French expect a space before colons, semicolons, question marks, and exclamation points. A good translation company will worry about these details for you, but if you're doing your own translation, pay close attention to punctuation rules.

Many other languages can be even more complicated than German and French, and even if the language's rules are known and defined, generating the data required to translate all of your game's text will be a major undertaking. The point is if you're considering a system that involves text manipulation, you're going to have to talk to someone who is knowledgeable about each of the planned languages well in advance to try to find a system that is useable.

"T" Time: Text and Translation  Next Page