Merge pull request #1056 from appwrite/feat-locale-env-support
feat-locale-env-support
This commit is contained in:
commit
b15aef0c5d
1
.env
1
.env
|
@ -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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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.',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -56,6 +56,7 @@ services:
|
|||
- influxdb
|
||||
environment:
|
||||
- _APP_ENV
|
||||
- _APP_LOCALE
|
||||
- _APP_CONSOLE_WHITELIST_EMAILS
|
||||
- _APP_CONSOLE_WHITELIST_IPS
|
||||
- _APP_SYSTEM_EMAIL_NAME
|
||||
|
|
|
@ -75,6 +75,7 @@ services:
|
|||
- influxdb
|
||||
environment:
|
||||
- _APP_ENV
|
||||
- _APP_LOCALE
|
||||
- _APP_SYSTEM_EMAIL_NAME
|
||||
- _APP_SYSTEM_EMAIL_ADDRESS
|
||||
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
|
||||
|
|
Loading…
Reference in a new issue