Internationalization in GTK+

by Owen Taylor

Red Hat, Inc.
Abstract

GTK+ provides the basic tools for writing applications that can work in the user's native language and writing system. The current implementation uses the facilities of the operating system and the X libraries and supports the major languages of Europe and East Asia. Future plans include suppport for the Unicode standard and languages written in a right-to-left direction.


Introduction

Writing software that works for people in all countries, all languages, and all scripts is a challenge. There are a number of issues that must be addressed. First, provisions must be made to allow the user to input text in their native language. This can be a simple matter of changing the keyboard mapping. (As it is usually is for European languages) or it can be a highly complex process involving dictionary lookups. The latter situation often comes up for the languages of East Asia, where the user's phonetic input must be converted into the correct ideograph from a set of thousands of characters. (These languages are often known as the CJK languages, for China, Japan, and Korea.)

Output is another issue that must be dealt with. When displaying CJK text, the primary difficulty is that the fonts needed contain a very large set of characters, so instead of the 8 bits that are sufficient for displaying Roman text, 16 bits are needed per character to index the font. When displaying mixed Roman and CJK text, it is often necessary to use multiple fonts when displaying a single string. A different set of problems comes up for the languages of the Middle East, which are written predominately in a right-to-left direction instead of a left-to-right direction. For these languages, it is necessary to reorder the characters before displaying them on the screen.