your xorgwizard417-loc.pet works with np as for 2-letter langage codes.
i think the code from MU can be expanded for more precise language selection.
line 38-45 (code from MU)
Code: Select all
#-- simple localization for scripts by MU. Localized JJ Moulinier July 2009
mo=xorgwizard.mo
lng=`echo $LANG | sed "s/\(..\).*/\1/"`
#echo $lng
. "/usr/share/locale/en/LC_MESSAGES/$mo"
if [ -f "/usr/share/locale/$lng/LC_MESSAGES/$mo" ];then
. "/usr/share/locale/$lng/LC_MESSAGES/$mo"
fi
Code: Select all
#-- simple localization for scripts by Shinobar based on MU.
mo=xorgwizard.mo
# set locale
for lng in C $(echo $LANGUAGE|cut -d':' -f1) $LC_ALL $LANG;do :;done # ex. ja_JP.UTF-8
# search locale file
lng1=$(echo $lng|cut -d'.' -f1) # ex. ja_JP
lng2=$(echo $lng|cut -d'_' -f1) # ex. ja
LOCALEDIR=/usr/share/locale
[ "$mo" ] || mo=$(basename $0).mo
for D in en C $lng2 $lng1 $lng
do
F="$LOCALEDIR/$D/LC_MESSAGES/$mo"
[ -f "$F" ] && . "$F"
done