use setvar and respect settings as given in zshenv.local
[zsh.git] / .zsh / 12_Locale.zsh
1 # -*- mode: sh;-*-
2
3 (( $+commands[locale] )) && __() {
4 local locales
5 local locale
6
7 zstyle -a ':ganneff:config' locales locales \
8 || locales=( "LANG de_DE.utf8 en_GB.utf8 C.UTF-8 C" \
9 "LC_MESSAGES en_GB.utf8 de_DE.utf8 C.UTF-8 C" )
10 for locale in $locales; do
11 for l in $=locale[(w)2,-1]; do
12 if locale -a | grep -qx $l; then
13 export $locale[(w)1]=$l
14 break
15 fi
16 done
17 done
18 } && __ 2> /dev/null