This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Don't use anything besides ASCII or UTF-8 in messages

Try to always keep messages marked for translation in the plain 7-bit ASCII or in the UTF-8 character sets. Avoid using any other character sets.

The reason for this is technical. Since the original strings and their translations are stored in the same po files, they need to use a common encoding for gettext to be able to function when accessing the translation of a particular string. Gettext doesn't do any character set conversion itself when accessing a translation. Plain 7-bit ASCII is the only common subset between most encodings, and hence it was traditionally the only choice when writing translatable application strings.

Alternatively, you can as of lately also use UTF-8 in the translatable strings of your application. Since all GNOME translations are supposed to be encoded in UTF-8, this will also solve the need of using a common encoding. Using UTF-8 allows you to use characters like ©, ®, é, ñ, °, € and many others in your application strings when needed. Please note though that there are some things to consider before going the UTF-8 route:


2024-10-23 11:49