diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 375c026..3dea8f0 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -82,15 +82,28 @@ if command -v virsh > /dev/null; then export LIBVIRT_DEFAULT_URI="qemu:///system" fi -# Use ISO 8601 date & time. -if [[ "${LC_TIME}" != "en_DK.utf8" ]] && command -v locale > /dev/null; then - [[ "$(locale --all-locales)" == *en_DK* ]] && export LC_TIME="en_DK.utf8" -fi +function _modify_locale() { + local category=${1} + local value=${2} + if command -v locale > /dev/null; then + if [[ "$(locale --all-locales)" == *${value}* ]]; then + export ${category}=${value} + fi + fi + +} + +# Use ISO 8601 date & time. +_modify_locale LC_TIME en_DK.utf8 # Use english messages -if [[ "${LC_MESSAGES}" != "en_US.utf8" ]] && command -v locale > /dev/null; then - [[ "$(locale --all-locales)" == *en_US* ]] && export LC_MESSAGES="en_US.utf8" -fi +_modify_locale LC_MESSAGES en_CA.utf8 +# Use german currency +_modify_locale LC_MONETARY de_DE.utf8 +# german paper sizes +_modify_locale LC_PAPER de_DE.utf8 + +unfunction _modify_locale export CCACHE_DIR="/var/cache/ccache"