Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting the language right in GTK.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sheepdog
Guru
Guru


Joined: 14 Oct 2002
Posts: 369
Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA

PostPosted: Fri Nov 01, 2002 12:25 am    Post subject: Getting the language right in GTK. Reply with quote

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
Code:
locale

showed that the current locale was not set. All values were
Quote:
=POSIX
.

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
Code:
LANG
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
Code:
LANG=en
to obtain an English localization. To update the environment, once this file was created, the commands
Code:
env-update
source /etc/profile

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 setting
Code:
LANG=en_US
solved the problem.

Useful links:


-- Michael
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum