bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing a message catalog independently of the system locales


From: Bruno Haible
Subject: Re: Accessing a message catalog independently of the system locales
Date: Sun, 24 Oct 2010 17:37:46 +0200
User-agent: KMail/1.9.9

Hi Sylvain,

> Well, I guess that if I want to provide a one-click way to select the
> game language, I can embed .mo parsing in the application.
> 
> Or detect the missing locale and warn the user.
> 
> Or wait until all distros pre-install all locale definitions :)

This is more than you need. Just
  1) test whether an en_US.UTF-8 locale is present. If not, warn the user.
  2) Set the LC_CTYPE and LC_MESSAGES categories of the locale to en_US.UTF-8,
     via setlocale(), and set the LANGUAGE environment variable, using setenv().

> > Debian's culture is more focused on hackers, not desktop users. And
> > it has the principle to install the minimum amount of files. That
> > explains the difference, I think.
> 
> Hmm, what a good troll :)
> 
> Briefly:
> - http://www.debian.org/devel/debian-desktop/

Good to see. I didn't know about that subproject.

> - ubuntu> locale -a | wc -l
>   26

Half of these 26 locales are probably for English. But anyway, the en_US.UTF-8
locale alone is sufficient for your purpose.

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]