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

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

Re: Getting a list of available locales


From: Anssi Hannula
Subject: Re: Getting a list of available locales
Date: Sun, 19 Aug 2007 13:48:19 +0300
User-agent: Thunderbird 2.0.0.6 (X11/20070805)

Anssi Hannula wrote:
Hi!

The VDR project (GPL set-top-box style software) has an option in the setup menu to change the language (as commercial devices do). Previously a custom translation scheme was used, but using gettext would be preferable for many reasons.

However, having the ability to switch language during run-time is problematic; setlocale() can only be called with specific locale names, that vary depending on system. The correct one could be "fi", "fi_FI", address@hidden" etc.

It would help if there was some call that would return all the installed locales in "locale -a" style. Even better would be a call that returns a list of the locales that have a translation for a given text domain.

Is providing such a function a possibility? Should it be implemented in gettext, or glibc?

Or is there another option we have missed?

Apparently there was. Using LANGUAGE variable is independant from the actually installed locales, so it can be used to select a language.

Getting a list of languages that have the .mo file would still be useful, but not that critical anymore as that can be found out ourselves.

--
Anssi Hannula




reply via email to

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