bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Languange and country codes to english


From: Bruno Haible
Subject: Re: Languange and country codes to english
Date: Mon, 31 Dec 2007 11:40:20 +0100
User-agent: KMail/1.5.4

Hello,

Andrew Smith wrote:
> I would like to write a program to convert language and country codes to 
> human-readable, english names. For example given en_CA it will say 
> English (Canada).

You are assuming that English names are human readable? Maybe for you,
since you write in English, but not for many Chinese and Japanese people.
So, you better localize this string. In a German locale, for example,
en_CA would be explained as "Englisch (Kanada)".

The Translation Project [1] maintains a set of localizations for these
under the domains 'iso_639' and 'iso_3166' [2][3]. You can incorporate these
PO files in your project, or - on Debian systems - you can use the installed
.mo files of these domains.

> As a minimum this would be very handy to use in makefiles.

In makefiles? You mean, as file names? Beware, some of the language names
contain spaces and non-ASCII characters, for example
  nb = Norwegian Bokmål
and likewise for countries:
  CI = Côte d'Ivoire

> If I write this program and you're happy with how it works, will you 
> include it with gettext?

This program would most likely be a good addition to the 'iso_639' and
'iso_3166'. gettext itself does not need it. (gettext only contains the
mappings from the language and country abbreviations to English -
included in the documentation.)

Bruno


[1] http://translationproject.org/
[2] http://translationproject.org/domain/iso_639.html
[3] http://translationproject.org/domain/iso_3166.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]