X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/66e0c46c40148f44edc4a1ddfd1c63b4e577ab3f..793a56b4149f903b7440218ef207c2d8bec3ed56:/.zsh/zprofile/10_locale diff --git a/.zsh/zprofile/10_locale b/.zsh/zprofile/10_locale index 07cbf44..818351e 100644 --- a/.zsh/zprofile/10_locale +++ b/.zsh/zprofile/10_locale @@ -5,7 +5,7 @@ # Copyright © 1994–2008 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # -# Source repository: http://git.madduck.net/v/etc/zsh.git +# Source repository: git://git.madduck.net/etc/zsh.git # _set_locale() @@ -33,7 +33,12 @@ if [ -x =locale ]; then _LOCALE="$(locale -a)" # I prefer British English and UTF-8 over US English and non-UTF-8 + # And if available, I'll take New Zealand-ey (yes, I love you, GIRLFRIEND) case "$_LOCALE" in + *en_NZ.utf8*) + _set_locale en_NZ.UTF-8 + export LANG=en_NZ + ;; *en_GB.utf8*) _set_locale en_GB.UTF-8 export LANG=en_GB @@ -42,6 +47,11 @@ if [ -x =locale ]; then _set_locale en_US.UTF-8 export LANG=en_US ;; + *en_NZ.iso885915*) + _set_locale en_NZ.ISO-8859-15 + warn "no utf-8 locale available" + export LANG=en_NZ + ;; *en_GB.iso885915*) _set_locale en_GB.ISO-8859-15 warn "no utf-8 locale available" @@ -52,6 +62,11 @@ if [ -x =locale ]; then _set_locale en_US.ISO-8859-15 export LANG=en_US ;; + *en_NZ.iso88591*) + warn "no utf-8 locale available" + _set_locale en_NZ.ISO-8859-1 + export LANG=en_NZ + ;; *en_GB.iso88591*) warn "no utf-8 locale available" _set_locale en_GB.ISO-8859-1 @@ -62,6 +77,11 @@ if [ -x =locale ]; then _set_locale en_US.ISO-8859-1 export LANG=en_US ;; + *en_NZ*) + warn "no utf-8 or iso locale available" + _set_locale en_NZ + export LANG=en_NZ + ;; *en_GB*) warn "no utf-8 or iso locale available" _set_locale en_GB @@ -74,17 +94,8 @@ if [ -x =locale ]; then ;; esac - # regional stuff should be Swiss over German + # regional stuff should be German case "$_LOCALE" in - *de_CH.utf8*) - _set_regional_locale de_CH.UTF-8 - ;; - *de_CH.iso885915*) - _set_regional_locale de_CH.ISO-8859-15 - ;; - *de_CH.iso88591*) - _set_regional_locale de_CH.ISO-8859-1 - ;; *de_DE.utf8*) _set_regional_locale de_DE.UTF-8 ;; @@ -94,10 +105,21 @@ if [ -x =locale ]; then *de_DE.iso88591*) _set_regional_locale de_DE.ISO-8859-1 ;; + *de_CH.utf8*) + _set_regional_locale de_CH.UTF-8 + ;; + *de_CH.iso885915*) + _set_regional_locale de_CH.ISO-8859-15 + ;; + *de_CH.iso88591*) + _set_regional_locale de_CH.ISO-8859-1 + ;; esac unset _LOCALE fi +export LANGUAGE="${LANG}:en" + unfunction _set_regional_locale unfunction _set_locale