mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-24 19:38:26 +02:00
Added ability to change the default language in CP
This commit is contained in:
parent
66ce3f94ac
commit
7e42e4c45f
2 changed files with 7 additions and 4 deletions
|
@ -99,12 +99,12 @@ $container->set('view', function ($container) {
|
||||||
$uiLang = strtolower($parts[1]);
|
$uiLang = strtolower($parts[1]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$desiredLanguage = 'en_US';
|
$desiredLanguage = envi('LANG');
|
||||||
$uiLang = 'us';
|
$uiLang = envi('UI_LANG');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$desiredLanguage = 'en_US';
|
$desiredLanguage = envi('LANG');
|
||||||
$uiLang = 'us';
|
$uiLang = envi('UI_LANG');
|
||||||
}
|
}
|
||||||
$lang_full = Language::getName($desiredLanguage, 'en');
|
$lang_full = Language::getName($desiredLanguage, 'en');
|
||||||
$lang = trim(strstr($lang_full, ' (', true));
|
$lang = trim(strstr($lang_full, ' (', true));
|
||||||
|
|
|
@ -5,6 +5,9 @@ APP_DOMAIN=example.com
|
||||||
APP_ROOT=/var/www/cp
|
APP_ROOT=/var/www/cp
|
||||||
MINIMUM_DATA=false
|
MINIMUM_DATA=false
|
||||||
|
|
||||||
|
LANG=en_US
|
||||||
|
UI_LANG=us
|
||||||
|
|
||||||
DB_DRIVER=mysql
|
DB_DRIVER=mysql
|
||||||
DB_HOST=localhost
|
DB_HOST=localhost
|
||||||
DB_DATABASE=registry
|
DB_DATABASE=registry
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue