Re: New external dependency: iso-codes ?



Hi,

Le lundi 07 mars 2005 à 20:44 +0000, Bastien Nocera a écrit :
> On Mon, 2005-03-07 at 21:15 +0100, Christian Persch wrote:
> > Hi,
> > 
> > I'd like to add a new external dependency to GNOME Desktop: the
> > "iso-codes" package. It's available from cvs
> > [http://alioth.debian.org/projects/pkg-isocodes/] and tarball
> > [http://people.debian.org/~mckinstry/iso-codes-0.45.tar.gz].
> > 
> > Using this package will remove the duplicated translations of language
> > and country names from GNOME programs. Epiphany and Galeon already have
> > support for iso-codes (optional dependency atm), and there's a bug with
> > patch to make gedit's spell-check using it too
> > [http://bugzilla.gnome.org/show_bug.cgi?id=150535].
> > 
> > If nobody objects, I'm going to go ahead and make it a hard dependency
> > for Epiphany, and add the module to the gnome-2.12 jhbuild moduleset.
> 
> Are the country names translated as well?
> I'd be interested in using that in Totem, for the subtitles/soundtracks
> menus, and preferences.

Yes, there's "iso_639" domain for the languages, and "iso_3166" domain
for the country names.

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.

- 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).

Regards,
	Christian





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