I usually work with system interfaces rather than
human ones. Consequently I'm need some help on the following.
I would like to know how to present the name of a language
*in the languages own representation* as a link
on a web page. for e.g. to represent chinese I found the
following in an online dictionary 漢 whereas the www.wikipedia.org
home page (which has the best list that I can find) shows:
繁體中文 (Traditional Chinese) and 简体中文 (Simplified Chinese)
I thought the info would be in the glibc locale database,
and tried to extract it as follows:
locale -a |
grep _ | #don't show nationalities
grep -E '.utf8$' | #pick UTF-8 for my terminal
while read lang; do
language=`LANG=$lang locale language`
lang_name=`LANG=$lang locale lang_name`
territory=`LANG=$lang locale territory`
echo -e "$lang $territory\t$language\t($lang_name)"
done |
sort -k2,2
However most of these are missing. Why?
This can be confirmed by noticing the missing lang_name entries here:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/localedata/locales/?cvsroot=glibc
So is there a handy list of these on the web somewhere?
The following link says that it's not the best way to do it:
http://www.language-archives.org/REC/language.html
But presenting a numerical code to users is not an option.
I could also present a flag, but that also has problems:
http://tech.irt.org/articles/js173/
thanks.
--
Pádraig Brady - http://www.pixelbeat.org
--- Following generated by rotagator ---
Genesis of (weird) unix names
awk
This pattern scanning and text processing language was named
after its authors: Al Aho, Peter Weinberger, Brian Kernighan.
grep
"Global Regular Expression Print"
g/re/p is the ed command to print all lines matching a
certain pattern (where "re" is a "regular expression").
rc (as in ".bashrc" ...)
"rc" derives from "runcom", from the MIT CTSS system,ca. 1965.
There was a facility that would execute a bunch of commands
stored in a file; it was called "runcom" for "run commands",
and the file began to be called "a runcom"
--
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!