Skip to content

Commit

Permalink
Merge pull request #6 from Oefenweb/add-locales-defaultlanguage-langu…
Browse files Browse the repository at this point in the history
…age-variable

Add locales defaultlanguage language variable
  • Loading branch information
tersmitten committed Nov 20, 2015
2 parents 1843bed + d050dea commit 8db3c1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ None
* `locales_language_packs_absent` [default: `[]`]:
* `locales_default`:
* `lang` [default: `[en_US.UTF-8]`]: Provides default value for LC_* variables that have not been explicitly set
* `language` [optional]: Same as above? But with higher priority, [see](http://www.gnu.org/software/gettext/manual/gettext.html#Locale-Environment-Variables)
* `lc_address` [optional]: How addresses are formatted (country first or last, where zip code goes etc.)
* `lc_all` [optional]: Overrides individual LC_* settings: if LC_ALL is set, none of the below have any effect
* `lc_collate` [optional]: How strings (file names...) are alphabetically sorted. Using the "C" or "POSIX" locale here results in a strcmp()-like sort order, which may be preferable to language-specific locales
Expand Down
3 changes: 3 additions & 0 deletions templates/etc/default/locale.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# {{ ansible_managed }}

LANG="{{ locales_default.lang }}"
{% if locales_default.language is defined %}
LANGUAGE="{{ locales_default.language }}"
{% endif %}
{% if locales_default.lc_address is defined %}
LC_ADDRESS="{{ locales_default.lc_address }}"
{% endif %}
Expand Down

0 comments on commit 8db3c1d

Please sign in to comment.