summaryrefslogtreecommitdiffstats
path: root/src/locale.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/locale.sh')
-rw-r--r--src/locale.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/locale.sh b/src/locale.sh
index 2962b92..42c87f0 100644
--- a/src/locale.sh
+++ b/src/locale.sh
@@ -20,6 +20,23 @@
DEFAULT_LOCALE='en_US'
+_try_load_locale()
+{
+ local localedir="${1}"
+ local locale="${2}"
+ local ms=
+
+ for ms in "${localedir}/${locale}/LC_MESSAGES/${TEXTDOMAIN}.ms" \
+ "${localedir}/${locale}.ms"; do
+ if [ -f "${ms}" ]; then
+ . "${ms}"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
load_locale()
{
local localedir=
@@ -65,20 +82,3 @@ get_msg()
return 0
}
-
-_try_load_locale()
-{
- local localedir="${1}"
- local locale="${2}"
- local ms=
-
- for ms in "${localedir}/${locale}/LC_MESSAGES/${TEXTDOMAIN}.ms" \
- "${localedir}/${locale}.ms"; do
- if [ -f "${ms}" ]; then
- . "${ms}"
- return 0
- fi
- done
-
- return 1
-}