2 #// Usage: gawk -f list-locales.awk *.xml
3 #// Simply create a verbose list of known locales as stated in XML files.
4 #// Author: Eike Rathke <erack@sun.com>
11 function init_locale
() {
40 if ( inlang
&& /<DefaultName
>/ )
49 if ( incoun
&& /<DefaultName
>/ )
60 print "\n" count
" locales"
63 function printEntry
() {
67 gsub( /.
*\
//, "", tmp
)
68 gsub( /\.xml
/, "", tmp
)
69 split( tmp
, iso
, /_
/ )
71 printf( "%3s_%2s: %s - %s\n", iso
[1], iso
[2], language
, country
)
73 printf( "%3s %2s: %s %s\n", iso
[1], iso
[2], language
, country
)