How to Make Your Game Localization Ready

From GDWiki

Jump to: navigation, search

Contents

[edit] Localization Considerations

Things you should remember to do when creating a game that you plan to localize:

  • Try to use existing libraries that already deal with the different language settings (like Gettext).
  • Separate your strings into an external text file, XML file, or custom formatted resource file. You'll want to be able to change text strings without recompiling the game. Also, you'll want to be able to send this file to translators and have them understand how to edit it.
  • When translating English strings, be aware that other languages can take up as much as 50% more space (because their words tend to contain more characters, or because they require more words to convey the same meaning). You'll need to somehow allow for this extra space wherever you display text, or use a smaller font size to compensate. You may wish to add a parameter to your external string file's syntax to allow for font size specification.
  • Some languages are rendered top-down, not left-to-right. You'll need to allow for this when leaving space for text areas.
  • Some languages are rendered from right-to-left, not left-to-right. You may wish to add a parameter to your external string file's syntax to specify how you want the font to be rendered. (Top down, right-to-left, centered, justified, etc.) (also see SDL_Pango)
  • When adding variables to a string, word order is important. In English you would say, "You SEE the DRAGON." But in another language it might be "The DRAGON, you SEE." You'll need to come up with a flexible syntax for use in your external string file to allow for variables like these to be placed in your strings. Example: "You $1 the $2." where $1 and $2 are variables that are replaced at run-time by other strings. (E.g. Gettext has already support for this - this is only one of the many examples)


[edit] Non-ASCII languages

If you're planning to localize your game to Japanese, Chinese, Hebrew, or any other language that is not covered by the 256 character ASCII set, keep these items in mind:

  • When coding your game, ensure that your string data type can handle unicode characters. (In C++, use std::wstring not std::string) Otherwise, you string data type will not be able to hold all of the characters the language encompasses.
  • Create a font system capable of rendering TrueType fonts (TTF). You probably don't want to have to create bitmap fonts for the thousands of possible Chinese characters!


[edit] Things to avoid

Things you should remember to NOT do when creating a game that you plan to localize:

  • Don't hardcode any strings within the game's code.
  • Don't place text in image files (GIFs, JPEGs, bitmaps, etc). If you do this, each time you want to localize your game to a new language, you'll have to recreate those image files with new text.

[edit] Links

Personal tools