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

Bill Kendrick vox-tech@lists.lugod.org
Tue, 25 May 2004 17:18:59 -0700


On Tue, May 25, 2004 at 04:53:07PM -0700, Jan W wrote:
> 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've noticed on Debian, at least, that there's a file with language name
mappings:

  /usr/share/locale/all.locales

or some-such.

It would have, for example:

[en]
Name=Spanish
Name[en]=Spanish
Name[es]=Espanol

Or something similar.


Now, note, for Tux Paint, the "locale" setting can just be the English name
of the language (like "--lang spanish" or "--lang hebrew"), or a simplified,
accent-less local name for the language (like "--lang espanol" or
"--lang deutsch", as alternatives for Spanish and German).


See Tux Paint's README, man page (ooh, might not be updated in CVS yet!)
or run "tuxpaint --lang help" for a full list of the options.
(It shows both alternatives in columns, if I recall.)


The main point I want to make, if I'm understanding what you're asking for,
is to let you know that you should ONLY provide a dropdown of Tux Paint's
currently-supported languages... and you can do it with their names
(e.g., "spanish"), rather than with locale strings (e.g., "es_ES"). :^)


In the future, we'll want the Tux Paint Config interface itself to be
translatable, so when you're in French mode, you won't see:

  French
  Spanish
  English

you'd see:

  Francais
  L'anglais
  Espagnol

in the drop-down menu.


But that we can worry about later. :^)  It'd just be:

  gettext("French");
  gettext("Spanish");

etc.

And as we release new versions of Tux Paint with more languages, we just
add what's in the dropdown, and they'll eventually get translated to ALL of
the languages the config app supports  (in a perfect world ;^) )


Make sense?  I'm kinda distracted by work, and hungry. ;^]
  
-bill!
http://www.newbreedsoftware.com/       nail gun; if wielded improperly,
New Breed Software                       it can cause untold carnage.