23         $this->initializeElggLocale();
 
   32         return array_keys($this->locale);
 
   66         return (array) setlocale($category, 0);
 
  118     private function initializeElggLocale() {
 
  271         if (is_array($this->config->language_to_locale_mapping)) {
 
  272             $this->locale = array_merge($this->locale, $this->config->language_to_locale_mapping);
 
Provides locale related features.
setLocaleForLanguage(string $language, array $locale=[])
Set the locale settings for a language key.
getLanguageCodes()
Returns a list of supported laguage codes.
getLocale(int $category)
Get the current locale.
getLocaleForLanguage(string $language)
Returns the configured locale settings for a given language key.
__construct(protected Config $config)
Create new service.
setLocaleFromLanguageKey(int $category, ?string $language=null)
Set the locale from a language key.
setLocale(int $category, $locale)
Set the system locale to a new value, return the locale before the change.
$config
Advanced site settings, debugging section.
elgg_get_current_language()
Get the current system/user language or 'en'.