diff --git a/installer/installer.kmdr b/installer/installer.kmdr index 8524d25..079b58e 100755 --- a/installer/installer.kmdr +++ b/installer/installer.kmdr @@ -938,19 +938,28 @@ dcop @dcopid KommanderIf setText timelabel "$currdate" LANGUAGE="$LANG" if [ -r ~/.kde4/share/config/kdeglobals ]; then eval `grep -i Country ~/.kde4/share/config/kdeglobals` + # find country definition in selected language + [ "${Country}" ] || Country="C" + COUNTRY=`eval grep -m1 "${Country}$" /opt/kde/share/apps/kabc/countrytransl.map | sed "s|\t.*||"` +else + case ${LANGUAGE:3:2} in + IT) COUNTRY="Italy" ;; + CH) COUNTRY="Switzerland" ;; + US) COUNTRY="United States" ;; + UK) COUNTRY="United Kingdom" ;; + ES) COUNTRY="Spain" ;; + FR) COUNTRY="France" ;; + *) COUNTRY="${LANGUAGE:3:5}" ;; + esac fi -# find country definition in selected language -[ "${Country}" ] || Country="C" -COUNTRY=`eval grep -m1 "${Country}$" /opt/kde/share/apps/kabc/countrytransl.map | sed "s|\t.*||"` - # find language definition in selected language case ${LANGUAGE:0:5} in en_*) LANGUAGE="English (${LANGUAGE:3:2})" ;; es_*) LANGUAGE="EspaƱol" ;; it_IT) LANGUAGE="Italiano" ;; it_CH) LANGUAGE="Italiano (CH)" ;; - *) LANGUAGE="Unsupported" ;; + *) LANGUAGE="${LANGUAGE:0:2}" ;; esac dcop @dcopid KommanderIf setText langlabel "$LANGUAGE" dcop @dcopid KommanderIf setText countrylabel $"$COUNTRY" @@ -991,6 +1000,7 @@ if [ -r ~/.kde4/share/config/kdeglobals ]; then esac LANGUAGE=${LANGUAGE:0:5}.UTF-8 sed -i "s|LANG=.*|LANG=$LANGUAGE|" /etc/sysconfig/i18n + sed -i "s|LANG=.*|LANG=$LANGUAGE|" /etc/locale.conf fi fi @execEnd diff --git a/installer/installer.sh b/installer/installer.sh index a6e7acf..3d11c4e 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -344,7 +344,7 @@ dcop_write_details $"\ ${MOUNT_SPACE} Mbytes copied Installation time: $TIME_ELAPSED minutes" -CONFIGURED_FILES="/etc/sysconfig/keyboard /etc/sysconfig/i18n /etc/sysconfig/vconsole.conf \ +CONFIGURED_FILES="/etc/sysconfig/keyboard /etc/sysconfig/i18n /etc/vconsole.conf /etc/locale.conf \ /etc/X11/xorg.conf /etc/X11/xorg.conf.d/10-keyboard.conf /etc/X11/xorg.conf.d/20-touchpad.conf" for f in $CONFIGURED_FILES; do cp $f ${MOUNTPOINT}/${f}