Re: [Tuxpaint-devel] Fw: Bug#421916: tuxpaint-config settings aren't used by tuxpaint
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Mark K. K. <mkk...@gm...> - 2007-05-06 00:15:19
|
On Thu, May 03, 2007 at 09:35:31AM -0700, Bill Kendrick wrote: > Anyone have ideas how to have the gettext() layer tell what locales are > installed? Call setlocale(), and if it succeeds then the locale is installed, returns NULL if it isn't. I think the way it works is libintl queries glibc to see if the locale is available. I'm not sure if there's a way to get a complete list from glibc automatically. Even if setlocale() fails, you can just set the environment variable to force the locality's output in gettext(). I believe setlocale() is just used to make the system responses use the selected locale (ie, make perror() print error messages in the selected language, make date() default to selected locale output format, etc.) Since Tux Paint makes minimal use of glibc for such text formatting, I think we could just force-set the locale by setting the environment variable if that makes more sense from the user's perspective. -Mark |