fi
MOZILLA_FIVE_HOME=$LIBDIR
+
+MOZLOCALE="$(/usr/bin/locale | grep "^LC_MESSAGES=" | sed -e "s|LC_MESSAGES=||g" -e "s|\"||g" )"
+eval MOZLOCALE="$(echo $MOZLOCALE | sed -e "s|_\([^.]*\).*|-\1|g")"
+
+[ -f $MOZILLA_FIVE_HOME/chrome/$MOZLOCALE.jar ] && MOZARGS="-UILocale $MOZLOCALE"
+
+if [ -n "$MOZARGS" ]; then
+ FIREFOX="$LIBDIR/firefox $MOZARGS"
+else
+ FIREFOX="$LIBDIR/firefox"
+fi
+
if [ "$1" == "-remote" ]; then
- $LIBDIR/firefox "$@"
+ $FIREFOX "$@"
else
- PING=`$LIBDIR/firefox -remote 'ping()' 2>&1 >/dev/null`
+ PING=`$FIREFOX -remote 'ping()' 2>&1 >/dev/null`
if [ -n "$PING" ]; then
if [ -f "`pwd`/$1" ]; then
- $LIBDIR/firefox "file://`pwd`/$1"
+ $FIREFOX "file://`pwd`/$1"
else
- $LIBDIR/firefox "$@"
+ $FIREFOX "$@"
fi
else
if [ -z "$1" ]; then
- $LIBDIR/firefox -remote 'xfeDoCommand (openBrowser)'
+ $FIREFOX -remote 'xfeDoCommand (openBrowser)'
elif [ "$1" == "-mail" ]; then
- $LIBDIR/firefox -remote 'xfeDoCommand (openInbox)'
+ $FIREFOX -remote 'xfeDoCommand (openInbox)'
elif [ "$1" == "-compose" ]; then
- $LIBDIR/firefox -remote 'xfeDoCommand (composeMessage)'
+ $FIREFOX -remote 'xfeDoCommand (composeMessage)'
else
if [ -f "`pwd`/$1" ]; then
URL="file://`pwd`/$1"
fi
grep browser.tabs.opentabfor.middleclick ~/.mozilla/firefox/*/prefs.js | grep true > /dev/null
if [ 0 -eq 0 ]; then
- $LIBDIR/firefox -remote "OpenUrl($URL,new-tab)"
+ $FIREFOX -remote "OpenUrl($URL,new-tab)"
else
- $LIBDIR/firefox -remote "OpenUrl($URL,new-window)"
+ $FIREFOX -remote "OpenUrl($URL,new-window)"
fi
fi
fi