All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 # Defines locale settings
4 # Copyright © 1994–2017 martin f. krafft <madduck@madduck.net>
5 # Released under the terms of the Artistic Licence 2.0
7 # Source repository: http://git.madduck.net/v/etc/zsh.git
16 _set_regional_locale $1
19 _set_regional_locale()
26 export LC_TELEPHONE=$1
27 export LC_MEASUREMENT=$1
28 export LC_IDENTIFICATION=$1
31 if [ -x =locale ]; then
32 _LOCALE="$(locale -a)"
34 # I prefer British English and UTF-8 over US English and non-UTF-8
35 # And if available, I'll take New Zealand-ey (yes, I love you, GIRLFRIEND)
38 _set_locale en_NZ.UTF-8
42 _set_locale en_GB.UTF-8
46 _set_locale en_US.UTF-8
50 _set_locale en_NZ.ISO-8859-15
51 warn "no utf-8 locale available"
55 _set_locale en_GB.ISO-8859-15
56 warn "no utf-8 locale available"
60 warn "no utf-8 locale available"
61 _set_locale en_US.ISO-8859-15
65 warn "no utf-8 locale available"
66 _set_locale en_NZ.ISO-8859-1
70 warn "no utf-8 locale available"
71 _set_locale en_GB.ISO-8859-1
75 warn "no utf-8 locale available"
76 _set_locale en_US.ISO-8859-1
80 warn "no utf-8 or iso locale available"
85 warn "no utf-8 or iso locale available"
90 warn "no utf-8 or iso locale available"
96 # regional stuff should be German
99 _set_regional_locale de_DE.UTF-8
102 _set_regional_locale de_DE.ISO-8859-15
105 _set_regional_locale de_DE.ISO-8859-1
108 _set_regional_locale de_CH.UTF-8
111 _set_regional_locale de_CH.ISO-8859-15
114 _set_regional_locale de_CH.ISO-8859-1
120 export LANGUAGE="${LANG}:${LANG%_*}"
122 unfunction _set_regional_locale
123 unfunction _set_locale