Re: Language code to language name mapping
- From: Murray Cumming <murrayc murrayc com>
- To: Richard Hughes <hughsient gmail com>
- Cc: desktop-devel-list <desktop-devel-list gnome org>, Tobias Quathamer <toddy debian org>, Christian Perrier <bubulle debian org>, Bastien Nocera <hadess hadess net>, Alastair McKinstry <mckinstry debian org>
- Subject: Re: Language code to language name mapping
- Date: Thu, 27 Nov 2008 16:16:10 +0100
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.
>
> > 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()?
Then that translation would not be available to people who don't use
Pango, so the translation would still have to exist in iso-codes as a
duplicate.
I'd like a little library for this, but I know there are plenty of
people who would rather copy/paste the code than use a tiny library.
For C++ people, there's some simple, but complex-enough-to-get-wrong,
code to do various iso-codes XML parsing in Glom with libxml++, to get
locale names and currencies. I think gdm does something similar now.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]