Re: language list



Kaixo!

On Wed, May 23, 2001 at 01:30:27PM +0100, László Kovács wrote:
> Hi,
> 
> Another crosspost ...
> 
> I am trying to implement a similar language list mechanism as in
> gnome-libs/gnome_i18n_get_language_list(). This is about querying
> LC_ALL, LC_MESSAGES and LANG in this order,

It should be LANGUAGE, LC_ALL, LC_MESSAGES and LANG in that order.
LANGUAGE is a real list (others accept only one value)

> in fact setlocale() does
> this all for me. My problem is that although this is implemented in
> gnome-libs() Linux does not seem to like language lists in these
> variables.

Indeed. LC_*, and LANG only accept a locale value.
The real variable to look for language lists is LANGUAGE.
It is not used by setlocale(), but by gettext() family of functions.
Note that LANGUAGE alone is not enough, as it defines languages, but
not the encodings (eg, for language 'ru' (Russian) should it be displayed in
koi8-r, iso-859-5, cp1251, utf-8,...); that is the role of setlocale()
to define that.

> returns C, although the environment variables are set to the list. I
> dont know what am I doing wrong. On the other hand on Solaris setting
> these variables to a language list is illegal, it can be set to one
> locale only and only to one of those that are installed.

So it is on GNU/Linux.
Only LANGUAGE (a GNU extension) allows a list.

> Any thoughts?

Hope that helps.

More info on LANGUAGE can be get from GNU libc info pages.
 
> Laszlo
> 
> _______________________________________________
> gnome-i18n mailing list
> gnome-i18n@gnome.org
> http://mail.gnome.org/mailman/listinfo/gnome-i18n

-- 
Ki ça vos vĺye bén,
Pablo Saratxaga

http://www.srtxg.easynet.be/		PGP Key available, key ID: 0x8F0E4975




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