Commit 39325c65 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Replace deprecated language constant

parent 29813217
......@@ -75,6 +75,7 @@ class ConfigurationService extends AbstractService {
* Note that the default value will be set, if a option check fails.
*
* @return array
* @throws \InvalidArgumentException
*/
public function prepareConfig() {
if (!empty($this->extConfig)) {
......@@ -127,9 +128,9 @@ class ConfigurationService extends AbstractService {
unset($this->extConfig['viewLanguages']);
$availableLanguageKeys = [];
$languages = explode(
'|', TYPO3_languages
);
$locales = GeneralUtility::makeInstance(ObjectManager::class)->get(Locales::class);
$languages = $locales->getLocales();
foreach ($languages as $language) {
$availableLanguageKeys[$language] = TRUE;
}
......@@ -143,7 +144,7 @@ class ConfigurationService extends AbstractService {
}
}
if ($lang != 'default') {
if ($lang !== 'default') {
$this->extConfig['viewLanguages'][] = $lang;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment