1
0
Fork 0
mirror of synced 2024-06-02 02:44:47 +12:00

Merge pull request #1056 from appwrite/feat-locale-env-support

feat-locale-env-support
This commit is contained in:
Eldad A. Fux 2021-04-05 09:29:37 +03:00 committed by GitHub
commit b15aef0c5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 1 deletions

1
.env
View file

@ -1,5 +1,6 @@
_APP_ENV=production
_APP_ENV=development
_APP_LOCALE=en
_APP_SYSTEM_EMAIL_NAME=Appwrite
_APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io
_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io

View file

@ -68,6 +68,7 @@ ARG VERSION=dev
ENV _APP_SERVER=swoole \
_APP_ENV=production \
_APP_LOCALE=en \
_APP_DOMAIN=localhost \
_APP_DOMAIN_TARGET=localhost \
_APP_HOME=https://appwrite.io \

View file

@ -15,6 +15,14 @@ return [
'required' => false,
'question' => '',
],
[
'name' => '_APP_LOCALE',
'description' => 'Set your Appwrite\'s locale. By default, the locale is set to \'en\'.',
'introduction' => '',
'default' => 'en',
'required' => false,
'question' => '',
],
[
'name' => '_APP_OPTIONS_ABUSE',
'description' => 'Allows you to disable abuse checks and API rate limiting. By default, set to \'enabled\'. To cancel the abuse checking, set to \'disabled\'. It is not recommended to disable this check-in a production environment.',

View file

@ -313,7 +313,7 @@ App::setResource('layout', function($locale) {
}, ['locale']);
App::setResource('locale', function() {
return new Locale('en');
return new Locale(App::getEnv('_APP_LOCALE', 'en'));
});
// Queues

View file

@ -56,6 +56,7 @@ services:
- influxdb
environment:
- _APP_ENV
- _APP_LOCALE
- _APP_CONSOLE_WHITELIST_EMAILS
- _APP_CONSOLE_WHITELIST_IPS
- _APP_SYSTEM_EMAIL_NAME

View file

@ -75,6 +75,7 @@ services:
- influxdb
environment:
- _APP_ENV
- _APP_LOCALE
- _APP_SYSTEM_EMAIL_NAME
- _APP_SYSTEM_EMAIL_ADDRESS
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS