public function setLocale()
    {
        // Initialize Locale if set and configured.
        if ($this['language']->enabled() && $this['config']->get('system.languages.override_locale')) {
            $language = $this['language']->getLanguage();
            setlocale(LC_ALL, \strlen($language) < 3 ? ($language . '_' . strtoupper($language)) : $language);
        } elseif ($this['config']->get('system.default_locale')) {
            setlocale(LC_ALL, $this['config']->get('system.default_locale'));
        }
    }
public function setLocale()
    {
        // Initialize Locale if set and configured.
        if ($this['language']->enabled() && $this['config']->get('system.languages.override_locale')) {
            $language = $this['language']->getLanguage();
            setlocale(LC_ALL, \strlen($language) < 3 ? ($language . '_' . strtoupper($language)) : $language);
        } elseif ($this['config']->get('system.default_locale')) {
            setlocale(LC_ALL, $this['config']->get('system.default_locale'));
        }
    }
public function setLocale ( ) { // Initialize Locale if set and configured. if ( $ this [ 'language' ] -> enabled ( ) && $ this [ 'config' ] -> get ( 'system.languages.override_locale' ) ) { $ language = $ this [ 'language' ] -> getLanguage ( ) ; setlocale ( LC_ALL , \ strlen ( $ language ) < 3 ? ( $ language . '_' . strtoupper ( $ language ) ) : $ language ) ; } elseif ( $ this [ 'config' ] -> get ( 'system.default_locale' ) ) { setlocale ( LC_ALL , $ this [ 'config' ] -> get ( 'system.default_locale' ) ) ; } }
Set the system locale based on the language and configuration
Set the system locale based on the language and configuration