Browse Source

set locales

Fabian Peter Hammerle 5 years ago
parent
commit
a0c009cb5c
2 changed files with 24 additions and 0 deletions
  1. 2 0
      README.md
  2. 22 0
      rc.xsh

+ 2 - 0
README.md

@@ -2,6 +2,8 @@
 
 http://xon.sh/envvars.html
 
+[StackExchange: What should I set my locale to ...?](https://unix.stackexchange.com/questions/149111/what-should-i-set-my-locale-to-and-what-are-the-implications-of-doing-so)
+
 ## Installation
 
 ```{sh}

+ 22 - 0
rc.xsh

@@ -32,6 +32,28 @@ import os
 import re
 import shutil
 
+# default locale
+# will be used for all non-explicitly set LC_* variables
+$LANG = 'en_US.UTF-8'
+# fallback locales
+# GNU gettext gives preference to LANGUAGE over LC_ALL and LANG
+# for the purpose of message handling
+# https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
+# cave: if this list contains 'de(_.*)?' at any (sic!) position
+#       vim 7.4.1689 will switch to german
+$LANGUAGE = ':'.join(['en_US', 'en'])
+$LC_COLLATE = 'C.UTF-8'
+# char classification, case conversion & other char attrs
+$LC_CTYPE = 'de_AT.UTF-8'
+# $ locale currency_symbol
+$LC_MONETARY = 'de_AT.UTF-8'
+# $ locale -k LC_NUMERIC | head -n 3
+# decimal_point="."
+# thousands_sep=""
+# grouping=-1
+$LC_NUMERIC = 'C.UTF-8'
+# A4
+$LC_PAPER = 'de_AT.UTF-8'
 $EDITOR = 'vim'
 # required by pinentry-tty when using gpg command:
 $GPG_TTY = $(tty)