Proposal to improve support for ISO 3166 Country Codes in KLocale
Albert Astals Cid
aacid at kde.org
Sat Feb 6 12:22:27 GMT 2010
A Dissabte, 6 de febrer de 2010, Freek de Kruijf va escriure:
> Op zaterdag 6 februari 2010 06:35:24 schreef Albert Astals Cid:
> > A Dijous, 4 de febrer de 2010, John Layt va escriure:
> > > [cc: to Marble, Edu, and i18n lists for comment, please try reply to
> > > k-c-d to keep thread in one place]
> > >
> > > I would like to propose improving our support for the ISO 3166 Country
> > > Code standard (http://en.wikipedia.org/wiki/ISO_3166) in two areas.
> > >
> > > Firstly, some apps need to translate between the alpha 2, alpha 3 and
> > > numeric forms of the code, e.g. the EXIF standard uses alpha 3 codes,
> > > but KDE uses alpha 2 for example when fetching the translated country
> > > name to display.
> > >
> > > Secondly, some libraries and apps would like to use the subdivision
> > > codes as provided by ISO 3166-2
> > > (http://en.wikipedia.org/wiki/ISO_3166-2), e.g. KHolidays wants to know
> > > a users state or province to know which regional holidays to display.
> > > Other users could be Marble, KGeography, etc.
> > >
> > > While it would be easy to add the alpha 3 code to each locale's
> > > .desktop file, this would be inefficient on a one-off look-up (reading
> > > 100 files each time on average), so I was initially thinking a static
> > > table loaded from a file would work better.
> > >
> > > The subdivisions, however, with some 4200 codes currently defined,
> > > could quickly become a support and translation nightmare.
> > >
> > > Fortunately, there exists the iso-codes project (http://pkg-
> > > isocodes.alioth.debian.org/) which provides the ISO 639 Language Codes,
> > > ISO 3166 Country Codes, ISO 4217 Currency Codes, and ISO 15924 Script
> > > Codes in XML files, along with translations into some 38 languages.
> > >
> > > I propose that we depend on iso-codes, use the 3166 xml file as the
> > > source for a code conversion method, and use the 3166-2 xml file as a
> > > source for the subdivision codes. The package appears in every major
> > > distro I've looked at.
> > >
> > > My big question is over translations. The XML file contains
> > > subdivision names in their local version, so even en_US would require
> > > translating. I assume we would be able to use the provided
> > > translations, or would we have to do our own?
> >
> > Depends on how translations are provided and what you want to do with
> > them. Please elaborate.
>
> Translation are done in the translationproject.org, which has strong
> relations with the Free Software Foundation. Currently there are 83
> different teams, each representing a language.
This doesn't answer my question but good to know anyway :-)
My question is how John wants to use that XML files and if it's just XML files
using the lang="foo" attribute or it's XML files + .po files for translation
or what.
Albert
More information about the kde-core-devel
mailing list