Re: Running language, again...



On Wed, 2009-06-17 at 20:46 -0400, José Alburquerque wrote:
> On Wed, 2009-06-17 at 16:34 +0200, Sever P A wrote:
> > I simply ask you if there is a more portable mechanism to know the
> > environmental language, for
> > the one side, and then to know if it works with an standard
> > equivalence language list for each code.
> 
> if you have your distribution's development man pages (on ubuntu it is
> called manpages-dev) you can run 'man setlocale' and get info on the
> system's setlocale() function.

Yes, that's what I use in Glom, in the 
TranslatableItem::get_current_locale() function. I'm not very proud of
it:

http://git.gnome.org/cgit/glom/tree/glom/libglom/data_structure/translatable_item.cc#n189

It seems to work.

I also use iso-codes in Glom to discover human-readable names for
locales and their languages, and to get translated text for those
human-readable names. 

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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