diff --git a/manifest.toml b/manifest.toml index 692685d..9cd48fd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -48,6 +48,13 @@ ram.runtime = "512M" type = "group" default = "visitors" + [install.language] + ask.en = "Choose the application language" + ask.fr = "Choisissez la langue de l'application" + type = "select" + choices = ["en_US", "es_ES", "it_IT", "fr_FR", "de_DE"] + default = "en_US" + [install.user_home] ask.en = "Access the users home folder from Nextcloud?" ask.fr = "Accéder au dossier personnel des utilisateurs depuis Nextcloud ?" diff --git a/scripts/install b/scripts/install index 2df768a..e1e81b3 100755 --- a/scripts/install +++ b/scripts/install @@ -96,7 +96,18 @@ ynh_script_progression --message="Configuring $app..." --weight=8 # Set the mysql.utf8mb4 config to true in config.php exec_occ config:system:set mysql.utf8mb4 --type boolean --value="true" -# move the logs from the data_dir to the standard /var/log +# Set default language in config.php +raw_language=$(echo "$language" | awk -F'_' '{print $1}') +exec_occ config:system:set default_language --value="$raw_language" + +# Set default locale in config.php +exec_occ config:system:set default_locale --value="$language" + +# Set default phone region in config.php +country=$(echo "$language" | awk -F'_' '{print $2}') +exec_occ config:system:set default_phone_region --value="$country" + +# Move the logs from the data_dir to the standard /var/log exec_occ config:system:set logfile --value="/var/log/$app/nextcloud.log" # Ensure that UpdateNotification app is disabled