Re: Language code to language name mapping



On Wed, 2008-11-26 at 16:27 -0500, Behdad Esfahbod wrote:
> My question right now is, how do applications (intlclock, etc...) do that
> currently?  And how do people think it should be done.

GtkHtml uses iso-codes to present a list of spell checking languages.
It parses the iso_639.xml and iso_3166.xml files (using GMarkupParser)
into hash tables, then uses the tables to construct language/country
code descriptions of the form "language-name (country-name)" with
suitable fallbacks.

It's probably the most obvious approach, and perhaps not what you're
looking for.  But the parser, should you wish to peek, is in:

   gtkhtml/components/editor/gtkhtml-spell-language.c

HTH,
Matthew Barnes



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