summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
}