From 464d252d5532be119337b0005c0fb6d25f9c6244 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 Apr 2007 13:47:54 +0000 Subject: [PATCH] * Set the LANG environment variable (default is en_US.UTF-8, can be overriden through the system configuration). svn path=/nixos/trunk/; revision=8541 --- etc/default.nix | 1 + etc/profile.sh | 1 + system/options.nix | 12 ++++++++++++ 3 files changed, 14 insertions(+) diff --git a/etc/default.nix b/etc/default.nix index d95a3fc3d12..20caa8c3c50 100644 --- a/etc/default.nix +++ b/etc/default.nix @@ -86,6 +86,7 @@ import ../helpers/make-etc.nix { inherit systemPath wrapperDir; inherit (pkgs) kernel glibc; timeZone = config.get ["time" "timeZone"]; + defaultLocale = config.get ["i18n" "defaultLocale"]; }; target = "profile"; } diff --git a/etc/profile.sh b/etc/profile.sh index 9235876c6bb..89ad895e9f5 100644 --- a/etc/profile.sh +++ b/etc/profile.sh @@ -5,6 +5,7 @@ export PAGER=less export TZ=@timeZone@ export TZDIR=@glibc@/share/zoneinfo export FONTCONFIG_FILE=/etc/fonts/fonts.conf +export LANG=@defaultLocale@ # A nice prompt. diff --git a/system/options.nix b/system/options.nix index 76aebb102d0..7dae30f05bc 100644 --- a/system/options.nix +++ b/system/options.nix @@ -856,4 +856,16 @@ } + { + name = ["i18n" "defaultLocale"]; + default = "en_US.UTF-8"; + example = "nl_NL.UTF-8"; + description = " + The default locale. It determines the language for program + messages, the format for dates and times, sort order, and so on. + It also determines the character set, such as UTF-8. + "; + } + + ]