Re: languages lists
On 1 May 2009, at 10:42, Frank Lin PIAT wrote:
[Please CC me, I am not subscribed to the list]
Hello,
I have written a Macro for our wiki, to automatically format and
display
the contributors' profiles ( http://wiki-debian-net.local/User/
JohnDoe )
I would like to Internationalize it, So I assume I should get the user
to type it's language code (en, pt, pt_BR, zh_CN ...) rather than full
text, so gettext has consistent inputs using. typically using:
gettext(get_language_name(lang_code))
BTW: what do you think about it? should I prompt for locale or iso636?
Do you know a package which provides a locales->language name table?
(the package iso-codes has such list, but only in it's source package
notes/language-in-locales.txt)
sample:
ar_YE:language "Arabic"
az_AZ:language "Azeri"
be_BY:language "Belarusian"
bg_BG:language "Bulgarian"
bn_IN:language "Bengali"
br_FR:language "Breton"
iso-codes provides the list in /usr/share/xml/iso_639.xml
This can then be localized using the "iso-codes" domain in gettext.
If you don't like XML, you can use the "isoquery" utility in the
isoquery package, which provides them
in a tab-delimited list for convenient scripting:
alastair@ailm:~$ isoquery --name --iso=639 | more
aar aar aa Afar
abk abk ab Abkhazian
ace ace Achinese
ach ach Acoli
ada ada Adangme
ady ady Adyghe; Adygei
afa afa Afro-Asiatic (Other)
afh afh Afrihili
afr afr af Afrikaans
ain ain Ainu
aka aka ak Akan
...
Regards
Alastair
Thanks in advance.
Franklin
--
To UNSUBSCRIBE, email to debian-i18n-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Regards,
Alastair
--
Alastair McKinstry , <alastair@sceal.ie> http://blog.sceal.ie
Anyone who believes exponential growth can go on forever in a finite
world
is either a madman or an economist - Kenneth Boulter, Economist.
Reply to: