mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Show a warning if the chosen locale by the user is not available on the system
refs #11820
This commit is contained in:
parent
95cbb61987
commit
1450bc4022
@ -156,6 +156,16 @@ class PreferenceForm extends Form
|
|||||||
*/
|
*/
|
||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
|
if (setlocale(LC_ALL, 0) === 'C') {
|
||||||
|
$this->warning(
|
||||||
|
$this->translate(
|
||||||
|
'Your language setting is not applied because your platform is missing the corresponding locale.'
|
||||||
|
. ' Make sure to install the correct language pack and restart your web server afterwards.'
|
||||||
|
),
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (! (bool) Config::app()->get('themes', 'disabled', false)) {
|
if (! (bool) Config::app()->get('themes', 'disabled', false)) {
|
||||||
$themes = Icinga::app()->getThemes();
|
$themes = Icinga::app()->getThemes();
|
||||||
if (count($themes) > 1) {
|
if (count($themes) > 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user