[Nix-dev] defaultLocale

Mathijs Kwik mathijs at bluescreen303.nl
Fri Jan 20 13:30:44 CET 2012


I use:

i18n.defaultLocale = "nl_NL.utf8";
environment.shellInit =''
  export LC_MESSAGES=en_US.utf8
'';

which does what you want, everything nl_NL except for messages/man
pages/command output.

I do however get strange warnings (not errors) sometimes that certain
apps fall back to the 'C' locale.
Other than that, it's good.


On Fri, Jan 20, 2012 at 12:44 PM, Eelco Dolstra <e.dolstra at tudelft.nl> wrote:
> 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/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list