Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 17 lines (13 sloc) 412 Bytes
#!/bin/sh
# Display a list of country codes and
# corresponding country name from locale database
# License: LGPLv2
locale -a |
grep _ | #don't show nationalities
uniq -w5 | #merge available charmaps
while read lang; do
echo -ne "$lang\t";
locale_info=`LANG=$lang locale territory language 2>/dev/null`
echo $locale_info | sed 's/\(.*\) \(.*\)/\1 (\2)/'
done |
sort -k2 #add -u to merge languages
Jump to Line
Something went wrong with that request. Please try again.