diff --git a/scripts/install b/scripts/install index 9584be8..b0d3ef6 100644 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,7 @@ source /usr/share/yunohost/helpers app=emailpoubelle +lang="fr_FR.UTF-8 en_US.UTF-8 it_IT.UTF-8" # Retrieve arguments domain=$1 @@ -49,6 +50,18 @@ if [[ ! $? -eq 0 ]]; then systemctl restart php*fpm* fi +#install locale (nginx will restart at the end of the install) +for i in $lang +do + cat /etc/locale/locale.gen | grep "^[^#;]" | grep $i + if [[ ! $? -eq 0 ]]; then + echo "$i UTF-8" >> /etc/locale.gen + locale=1 + fi +done +if [[ $locale -eq 1 ]]; then + locale-gen +fi # Copy source files sudo mkdir -p $final_path