#!/bin/bash finish=0 #If change locale the system need restart session to see the changes #Comprobe if language was selected code=$(cat ~/.codecheck | grep LANG= | tail --bytes 2) if [ $code = "0" ]; then lang=$(dialog --stdout --backtitle "System language selection" --menu "Choose your language:" 15 40 10 \ "en_US.UTF-8" "English" \ "gl_ES.UTF-8" "Galego" \ "es_ES.UTF-8" "Spanish" \ "pt_BR.UTF-8" "Brazilian Portuguese" \ "pl_PL.UTF-8" "Polish" \ "it_IT.UTF-8" "Italian" \ "fr_FR.UTF-8" "French" \ "eo" "Esperanto") #Copy locale in locale.conf echo "LANG=$lang" > /etc/locale.conf #Put a new line confirm that language was selected sed -i '/LANG=./d' ~/.codecheck echo "LANG=1" >> ~/.codecheck #Copy icewm menu in that language and scripts to install cp -a ~/.icewm/menuLanguages/menu_${lang/_*/} ~/.icewm/menu cp -a ~/.scriptsInstallation/language/${lang/_*/}/* ~/.scriptsInstallation/ finish=1 fi