summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-08-01 04:43:53 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-08-01 04:43:53 (EDT)
commitce28b93fe050f584417e758f5e72e8504609cf98 (patch)
treeda5810f03bb1c5a0eb0ebb3353fab335e233bd47
parent748ae1c86e67df5be672dee7fa3b2fdc91b1e53b (diff)
Set locale parameters in oh_locale_set().
-rw-r--r--lib/locale.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index d30a684..824b6b7 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -41,10 +41,16 @@ oh_locale_set()
# Try to load the locale.
if [ -f "@@LOCALEDIR@@/${_locale%.*}" ]; then
- . "@@LOCALEDIR@@/${_locale%.*}"
+ LC_ALL="${_locale%.*}"
+ LC_MESSAGES="${LC_ALL}"
+ . "@@LOCALEDIR@@/${LC_MESSAGES}"
elif [ -f "@@LOCALEDIR@@/${_locale%_*}" ]; then
- . "@@LOCALEDIR@@/${_locale%_*}"
+ LC_ALL="${_locale%_*}"
+ LC_MESSAGES="${LC_ALL}"
+ . "@@LOCALEDIR@@/${LC_MESSAGES}"
else
- . @@LOCALEDIR@@/en_US
+ LC_ALL=en_us
+ LC_MESSAGES="${LC_ALL}"
+ . "@@LOCALEDIR@@/${LC_MESSAGES}"
fi
}