Internationalization & Localization (I18N & L10N)

What are Internationalization(I18N) and Localization(L10N)?

From the GNU gettext info page:

By internationalization, one refers to the operation by which a program, or a set of programs turned into a package, is made aware and able to support multiple languages. This is a generalization process, by which the programs are untied from using only English strings or other English specific habits, and connected to generic ways of doing the same, instead. Program developers may use various techniques to internationalize their programs, some of them have been standardized. GNU gettext offers one of these standards.

By localization, one means the operation by which, in a set of programs already internationalized, one gives the program all needed information so that it can bend itself to handle its input and output in a fashion which is correct for some native language and cultural habits. This is a particularisation process, by which generic methods already implemented in an internationalized program are used in specific ways. The programming environment puts several functions to the programmers disposal which allow this runtime configuration. The formal description of specific set of cultural habits for some country, together with all associated translations targeted to the same native language, is called the locale for this language or country. Users achieve localization of programs by setting proper values to special environment variables, prior to executing those programs, identifying which locale should be used.

What I8N and L10N API does GNOME use?

GNOME uses the Uniforum's internationalization standard. This is the "standard" invented by Sun Microsystems and adopted by the GNU project in their "gettext" package. N.b., this is different from the competing X/Open standard.

How do I program using I18N and L10N, or Where do I find out more info on these topics?

Take a look at the GNU gettext package's online manual at http://gnu.org/manual/gettext/html_chapter/gettext_toc.html. There also is a very useful article from Linux Journal about internationalization issues at http://www.linuxjournal.com/issue59/3286.html. Additionally, you may find the I18N FAQ informative: http://www.vlsivie.tuwien.ac.at/mike/i18n.html.

How do I change the language of my GNOME programs?

To change the language that GNOME programs use, you just need to set the environment variable LANG to the desired ISO 639 language code. From that point forward, any new GNOME apps you run will try use that language.

Let's say you wanted to see GNOME in Spanish. In the Bourne Shell and its derivatives (such as Bash), you use set LANG="es". If you were using the C Shell (or tcsh), you would use setenv LANG "es" instead. These commands are generally put in the .profile or .login file, so that your environment starts up the same way each time.

Some languages (such as English and Spanish) need to be handled differently depending on where you are. In these cases you can extend the language code with an underscore followed by a ISO 3166 country code. So, if you want to select British English you would use "en_GB"; for Mexican Spanish you would use "es_MX".

Keep in mind that GNOME apps that are already running won't change languages while you change the LANG variable, you have to close the program and reopen it for the new value to take effect. Also note that some languages are not offered by all applications. You might find some apps using the language you want, and others using English.

You can find the list of all the ISO Language and Country Codes at http://www.twics.com/~craig/writings/linux-nihongo/node93.html. Here's the list of the codes currently supported by GNOME-core:

Catalan (ca)
Czech (cs)
Danish (da)
German (de)
English [USA] (en) [Yeah, life's not fair]
English [Great Britain] (en_GB)
Spanish [Spain] (es)
Spanish [Dominican Republic] (es_DO)
Spanish [Guatemala] (es_GT)
Spanish [Honduras] (es_HN)
Spanish [Mexico] (es_MX)
Spanish [Panama] (es_PA)
Spanish [Peru] (es_PE)
Spanish [Sweden?] (es_SV) [Should be es_SE if its Sweden]
Basque (eu)
Finnish (fi)
French (fr)
Irish (ga)
Hungarian (hu)
Italian (it)
Japanese (ja)
Korean (ko)
Dutch (nl)
Norwegian (no)
Polish (pl)
Portuguese (pt)
Russian (ru)
Slovak (sk)
Swedish (sv)
Waloon (wa)