Joined: 14 Oct 2002
Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA
|Posted: Fri Nov 01, 2002 12:25 am Post subject: Getting the language right in GTK.
|Getting the Language Right in GTK
If you are having difficulty getting GTK or applications that depend upon GTK to show strings in the language of your current locale this may be helpful.
I installed Gentoo 1.4_rc1 on a brand new machine with the intention of transferring an application I had written in wxPython from a WinXP-Cygwin installation to the new box. After emerging all necessary libraries and transferring the python code, upon starting the application I was surprised to discover all strings were being shown in Kanji.
Output from the command
showed that the current locale was not set. All values were .
Apparantly the Gentoo installation did not take into account the need for localization. To assign a locale to the installation at a minimum the environmental variable must be correctly set.
Environmental variables for a Gentoo installation are set in the /etc/env.d directory. I created a file 02Language that contained the single line to obtain an English localization. To update the environment, once this file was created, the commands
were issued. locale now showed the environment variables set to "en".
But my application still had Kanji strings. Adding the second territory part to the LANG settingsolved the problem.