get list of available locales
- From: Matthew Talbert <ransom1982 gmail com>
- To: GTK Devel <gtk-app-devel-list gnome org>
- Subject: get list of available locales
- Date: Mon, 14 Sep 2009 11:31:41 -0400
Hi,
This is quite possibly the wrong place to ask this question. If so,
please point me the right direction.
In our GTK/GNOME application, our users would like the ability to use
the program in a locale of their choice (out of the ~10 translations
we have available) rather than detecting automatically which to use.
(well, most users will be fine with automatic, but we have some
exceptions). So we've implemented this by setting LC_ALL before we
initialize GTK/GNOME. The unfortunate part of this is that there seems
to be a lot of variations in how this variable actually works on
different distros. For example, "fr_FR" is fine for Fedora, but Ubuntu
requires it to be fr_FR.UTF-8. This is true for most locales, but
there are some on Ubuntu that do not have the ending UTF-8 as well.
My question is whether there is a way, either in the gtk stack or
elsewhere, to get a list of available locales at runtime so that we
can match this up as best as possible.
Also, if we're completely going about this wrong, a saner way to do
this would be nice as well.
Preferably the solution should work on Linux and Windows. However,
Windows is less of a problem at the moment, because we have more
control over the environment there.
Thanks,
Matthew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]