There is a very useful database of "country" specific
information, located on all linux systems.
For e.g. if one wants to lookup the international
telephone prefix for France, you do:
LANG=fr_FR locale int_prefix
I have found it difficult to interact with this
locale database though. In the above example
how does one know how to specify the record (fr_FR)
or to select the field (int_prefix). so...
To list the fields available, do:
locale | cut -d= -f1 | xargs locale -kc | less
To list the records (countries) available, do:
locale -a |
grep _ | #don't show nationalities
grep -Ev '[.@]' | #ignore diffent charmaps
while read lang; do
echo -n "$lang "; LANG=$lang locale territory
done |
sort -k2
Pádraig.
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!