[Home] [Back] [Up] [<<] [>>]

Internationalisation - Basic Rules

There are a few basic rules you should follow to develop products that are easier to localise:

Never hard-code translatable text. If you have text embedded in your source code, you will have to compile a different executable for each locale that has been translated. This approach creates problems when trying to keep the versions up-to-date.

Do not reuse the same string in different context. Although the string works in the source language, this does not mean the translation will work the same way. For example, many languages accord adjectives and nouns depending on gender.

Remember that 1 byte <> 1 character <> 1 glyph.

Some code sets use several bytes to encode one character, while others are decomposed in different parts. A character can also have a different representation depending on the context.

Watch for strings with several parameters. The order in which the parameters are called in the source language may be different after translation. Use order-independent formatting functions to code these cases.



[Home] [Back] [Up] [<<] [>>]