[vox-tech] Locales and installed languages/charsets (in C)

Mark K. Kim vox-tech@lists.lugod.org
Tue, 25 May 2004 17:50:41 -0700 (PDT)


(CC'ing Tuxpaint-dev mailing list)

Hi Jan!

Tux Paint knows a little over 40 different languages.  The config program
(which Jan is writing, for the readers that don't know) only needs to
support only those 40+ languages.  Listing any more in the language
options box is going to only confuse the user I think.

For the time being, it would be fine to hard-code the list of languages
(and their charsets, which is, for now, either none or UTF8) into the
program.  As we add more languages, we can modify the config program to
reflect the added languages.  It wouldn't be much more difficult than
modifying the hard-coded language list in the Tux Paint sourcecode.

I wish you could get the list of languages and their charsets from the OS
but there's no cross-platform way to do this as far as I know.  Also, a
single language can support multiple charsets and average user doesn't
know about charsets so it might confuse them to list multiple entries of
one language in the config program.  In any case, for now, I think hard
coding will be fine (that's how Tux Paint works, so we'll at least be
consistent with the Tux Paint program ^-^)

It would be nice, though, if the config program can simply query the Tux
Paint binary to get the list of available languages and charsets, similar
to `tuxpaint --lang help` but with more information, so the hard coding
doesn't need to be done in two different places, in the main program and
the config program.  Furthermore, it'd be even cooler if the Tux Paint
could be queried to get the *complete* list of options and its logical
grouping so the config program doesn't need to have *any* hard coded
information about Tux Paint's options, so it doesn't need to be updated
whenever Tux Paint program gets updated with new options.

What does everyone on the tuxpaint-dev list think?  Comments please!

-Mark


On Tue, 25 May 2004, Jan W wrote:

> Hi all:
>
> My question is mostly for Mark.  I am a _complete_ language/locale/charset noob
> (I only speak english, for shame).
>
> so here goes:
>
> I have a fltk app (tuxpaint-config) which allows users to reset the language of
> the (tuxpaint) application.  However, I need to know how to get things to
> display right for an option box, the locale chooser.  I know 'locale -a' lists
> all locales, and 'locale -m' lists the charsets available (and the -c option
> gives also languages).  What I would like to know is how do I translate
> ISO-8599-1 <or> en_US <to> english (so that users can choose the right language
> without having to know about locales or charsets).  Ideally, I would like
> something that gives output like:  ISO-8599-1:en_US:English (United States), so
> I have all the charset/locale/language data and I can choose which to
> display...
>
> I just need a simple list to give a user that has the locally installed
> languages, and get enough info from this listing to correctly name the locale
> in tuxpaint.conf.
>
> I am just too hammered to try to figure this one out...  sorry if I am a doofus
> and the answer is simple.
>
> --thanks a million
>
> jan
>
> =====
> <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> EDUCATION, n. That which discloses to the wise and disguises from the
> foolish their lack of understanding.
> <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>

-- 
Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.jsp?id=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage