3 # outputs locale variable names (LANG, LC_MESSAGE, LC_ALL, ...) which
4 # are found to be unavailable on the system.
7 .
/usr
/lib
/tool
/bash-utils
12 locales
=($
(locale
-a))
13 localecodes
=($
(for locale
in "${locales[@]}"; do echo ${locale%%.*}; done))
14 languagecodes
=($
(for localecode
in "${localecodes[@]}"; do echo ${localecode%%_*}; done))
16 while IFS
='=' read option settings
19 settings
=${settings//\"/}
26 for setting
in ${settings//:/ }
28 parts
=(${setting/./ })
31 charset
=${charset//-/}
34 if [ -z "${langcode//[!_]/}" ]
37 list
=("${languagecodes[@]}")
38 elif [ -n "$charset" ]
40 setting
=$langcode.
$charset
41 list
=("${locales[@]}")
44 list
=("${localecodes[@]}")
47 if in_list
"$setting" "${list[@]}"