Re: Running language, again...



On Fri, 2009-06-19 at 16:12 +0200, Sever P A wrote:
> The appropiate list for an english environment, would be,
> ("English", "Spanish", "French", "Italian")
> 
> And for the french environment...
> ("Anglais", "Espagnole", "Français", "Italien")
> 
> And for the spanish environment...
> ("Inglés", "Español", "Francés", "Italiano")

iso-codes can give you this. It provides XML that you'll need to parse,
and gettext translations that you'll need to use via a specific gettext
domain.

Glom uses it, for instance in
get_locale_name():
http://git.gnome.org/cgit/glom/tree/glom/libglom/data_structure/iso_codes.cc#n99
(You could probably just take the whole .h/.cc files for that if your
application is GPL.)

Maybe we should have a real C++ API around iso-codes to make life
easier. 


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



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