Re: Language code to language name mapping



On Thu, 2008-11-27 at 13:50 +0000, Richard Hughes wrote:
> On Thu, 2008-11-27 at 09:49 +0000, Bastien Nocera wrote:
> > Then just use iso-codes. You can either choose to use the XML file, or
> > the 500k /usr/share/iso-codes/iso_639.tab tab-separated file.
> 
> ## PLEASE NOTE: THIS FILE IS DEPRECATED AND SCHEDULED TO BE REMOVED.
> ## IT IS FOR BACKWARD-COMPATIBILITY ONLY: PLEASE USE THE ISO-639.XML
> ## FILE INSTEAD.

Fair enough.

> > There's no points in reinventing the wheel or coming up with crazy
> > hacks to parse a 500 line file :)
> 
> Right, but I would argue I should have to add an XML parser to
> gnome-packagekit just to convert "fr" -> "French". Surely this sort of
> translation should be done in Pango? pango_language_to_description()?

In Totem we use GMarkup, which is built into GLib, and good enough to
parse this XML file. And you already use D-Bus which links against
expat, so the choice is yours.



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