23 $this->initializeElggLocale();
32 return array_keys($this->locale);
66 return (array) setlocale($category, 0);
83 setlocale($category, $locale);
106 return $this->
setLocale($category, $locale);
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);
elgg_get_current_language()
Get the current system/user language or 'en'.
getLocaleForLanguage(string $language)
Returns the configured locale settings for a given language key.
setLocaleForLanguage(string $language, array $locale=[])
Set the locale settings for a language key.
setLocale(int $category, $locale)
Set the system locale to a new value, return the locale before the change.
setLocaleFromLanguageKey(int $category, string $language=null)
Set the locale from a language key.
getLanguageCodes()
Returns a list of supported laguage codes.
$config
Advanced site settings, debugging section.
Provides locale related features.
getLocale(int $category)
Get the current locale.
__construct(protected Config $config)
Create new service.