diff --git a/conf/temp.gsconfig.php b/conf/temp.gsconfig.php index 5b25a12..bff157f 100644 --- a/conf/temp.gsconfig.php +++ b/conf/temp.gsconfig.php @@ -71,7 +71,7 @@ define('GSDONOTPING', 1); # Set PHP locale # http://php.net/manual/en/function.setlocale.php -etlocale(LC_ALL, 'en_US'); +etlocale(LC_ALL, '__LANGUAGE__'); # Define default timezone of server, accepts php timezone string # valid timeszones can be found here http://www.php.net/manual/en/timezones.php diff --git a/manifest.json b/manifest.json index 72f66f5..9a18fae 100644 --- a/manifest.json +++ b/manifest.json @@ -44,6 +44,15 @@ "name": "is_public", "type": "boolean", "default": true + } { + "name": "language", + "type": "string", + "ask": { + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" + }, + "choices": ["de_DE", "fr_FR", "en_US", "nl_NL"], + "default": "fr_FR" } ] } diff --git a/scripts/install b/scripts/install index 0586710..5757c3f 100755 --- a/scripts/install +++ b/scripts/install @@ -27,7 +27,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -language=en_US +language=$YNH_APP_ARG_LANGUAGE timezone="$(cat /etc/timezone)" phpversion=$YNH_PHP_VERSION @@ -102,12 +102,12 @@ ynh_add_fpm_config #================================================= # ADD A CONFIGURATION #================================================= -# ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 -# ynh_add_config --template="../conf/temp.gsconfig.php" --destination="$final_path/gsconfig.php" +ynh_add_config --template="../conf/temp.gsconfig.php" --destination="$final_path/temp.gsconfig.php" -# chmod 655 "$final_path/gsconfig.php" -# chown $app:$app "$final_path/gsconfig.php" +# chmod 655 "$final_path/temp.gsconfig.php" +# chown $app:$app "$final_path/temp.gsconfig.php" #================================================= # SETUP SSOWAT