#!/bin/bash # set langs for kde # # Author: Dimitris Tzemos # . /usr/lib/liblinuxlive lang="`cmdline_value lang`" if [ "$lang" ]; then [[ "`locale -a | grep -w $lang`" ]] && \ sed -i "s/^ *\(export LANG=\).*$/\1$lang/" /etc/profile.d/lang.sh fi if [ "$locale" = "el_GR.utf8" ]; then Country=gr Language=el GreetString="Καλώς ήλθατε στο %n" elif [ "$locale" = "da_DK.utf8" ]; then Country=da Language=da GreetString="welcome to %n" elif [ "$locale" = "de_DE.utf8" ]; then Country=de Language=de GreetString="Willkommen zu %n" elif [ "$locale" = "it_IT.utf8" ]; then Country=it Language=it GreetString="Benvenuto su %n" elif [ "$locale" = "pt_PT.utf8" ]; then Country=pt Language=pt GreetString="Bem-vindo(a) ao %n" elif [ "$locale" = "pt_BR.utf8" ]; then Country=br Language=pt_BR GreetString="Bem-vindo à %n" elif [ "$locale" = "es_ES.utf8" ]; then Country=es Language=es GreetString="Bienvenido a %n" elif [ "$locale" = "es_AR.utf8" ]; then Country=ar Language=es GreetString="Bienvenido a %n" elif [ "$locale" = "en_GB.utf8" ]; then Country=gb Language=en_GB GreetString="welcome to %n" elif [ "$locale" = "fi_FI.utf8" ]; then Country=fi Language=fi GreetString="welcome to %n" elif [ "$locale" = "fr_FR.utf8" ]; then Country=fr Language=fr GreetString="Bienvenue dans %n" elif [ "$locale" = "tr_TR.utf8" ]; then Country=tr Language=tr GreetString="Hoşgeldiniz (%n)" elif [ "$locale" = "en_US.utf8" ]; then Country=us Language=en_US GreetString="welcome to %n" elif [ "$locale" = "hu_HU.utf8" ]; then Country=hu Language=hu GreetString="welcome to %n" elif [ "$locale" = "nl_NL.utf8" ]; then Country=nl Language=nl GreetString="welcome to %n" elif [ "$locale" = "sv_SE.utf8" ]; then Country=sv Language=sv GreetString="welcome to %n" elif [ "$locale" = "uk_UA.utf8" ]; then Country=uk Language=uk GreetString="welcome to %n" elif [ "$locale" = "ja_JP.utf8" ]; then Country=ja Language=ja GreetString="welcome to %n" elif [ "$locale" = "ru_RU.utf8" ]; then Country=ru Language=ru GreetString="Добро пожаловать в %n" else Country=gr Language=el GreetString="Καλώς ήλθατε στο %n" fi [[ "`locale -a | grep -w $locale`" ]] && \ sed -i "s/^ *\(Country=\).*$/\1$Country/" /root/.kde/share/config/kdeglobals [[ "`locale -a | grep -w $locale`" ]] && \ sed -i "s/^ *\(Language=\).*$/\1$Language/" /root/.kde/share/config/kdeglobals [[ "`locale -a | grep -w $locale`" ]] && \ sed -i "s/^ *\(Country=\).*$/\1$Country/" /home/slackel/.kde/share/config/kdeglobals [[ "`locale -a | grep -w $locale`" ]] && \ sed -i "s/^ *\(Language=\).*$/\1$Language/" /home/slackel/.kde/share/config/kdeglobals [[ "`locale -a | grep -w $locale`" ]] && \ sed -i "s/^ *\(Language=\).*$/\1$Language/" /etc/kde/kdm/kdmrc [[ "`locale -a | grep -w $locale`" ]] && \ sed -i "s/^ *\(GreetString=\).*$/\1$GreetString/" /etc/kde/kdm/kdmrc