Re: New external dependency: iso-codes ?



On Mon, 2005-03-07 at 22:26 +0100, Christian Persch wrote:

> There are two ways to get translated language/locale names:
> 
> - If you only want to support a fixed set, you can proceed as with any
> other translatable strings. Say, you have "Engligh (United Kingdom)".
> You store those 2 separately, { "English", "United Kingdom" }, translate
> the language name in the "iso_639" gettext domain, the country name in
> the "iso_3166" domain, and build the string from that.

Great.  This will need a little tutorial or document with a set of
guidelines, or people will just duplicate things all over the place
again :)

> - If you have locale codes "ab_CD" and want to translate that into a
> human-readable description, you have to parse XML files from iso-codes
> package (there's also a tabular format, but that one is 'in flux', to
> cite the maintainer). Epiphany has code to do that (and Galeon has
> copied it already); if it's of interest to other modules, the code could
> be separated out for easy cut-and-paste (or even upstreamed as a library
> into the iso-codes package).

Would it be feasible to write an preprocessor that munges the XML at
compile-time into some mmap()able binary file?  That way we'll avoid a
lot of memory bloat.

  Federico




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