summaryrefslogtreecommitdiff
path: root/firefox.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'firefox.sh.in')
-rw-r--r--firefox.sh.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/firefox.sh.in b/firefox.sh.in
index 803f74d..9c160d8 100644
--- a/firefox.sh.in
+++ b/firefox.sh.in
@@ -182,11 +182,16 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
rm `cat $FEDORA_LANGPACK_CONFIG` > /dev/null 2>&1
rm $FEDORA_LANGPACK_CONFIG > /dev/null 2>&1
fi
+
+ # Get locale from system
+ CURRENT_LOCALE=$LC_ALL
+ CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES}
+ CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG}
# Try without a local variant first, then with a local variant
# So that pt-BR doesn't try to use pt for example
- SHORTMOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*||g"`
- MOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*|-\1|g"`
+ SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"`
+ MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
# Try to link global langpacks to an extension directory
if [ -f $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then
bgstack15