[Nix-dev] defaultLocale

Eelco Dolstra e.dolstra at tudelft.nl
Fri Jan 20 12:44:01 CET 2012


Hi,

On 20/01/12 12:31, Arie Middelkoop wrote:

> I'd like to set some system defaults for currencies, 24h time, etc, so 
> I've set the 'defaultLocale' option in my /etc/nixos/configuration.nix:
> 
>  > i18n.defaultLocale = "nl_NL.UTF-8";
> 
> However, this setting is taking it a bit too far, because I now also get 
> localized output from tools, and complaints that manpages are missing.
> 
> So, I'd rather have the language set to US enlish, but do have localized 
> date/time notation, etc. Is there are middle ground?

I have this:

  environment.shellInit =
    ''
      # Ensure 24-hour time display in Thunderbird.
      export LC_TIME=en_GB.UTF8
    '';

However it's not perfect because it causes warnings in some places.  E.g. doing
"su" gives:

-bash: warning: setlocale: LC_TIME: cannot change locale (en_GB.UTF8): No such
file or directory

Possibly $LOCALE_ARCHIVE isn't set when bash is first called.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/


More information about the nix-dev mailing list