diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php index 7f3027a27671..61c4afb83e60 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php +++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php @@ -4501,6 +4501,10 @@ public function getData($string, $fieldArray = null) case 'sitelanguage': $siteLanguage = $this->getTypoScriptFrontendController()->getLanguage(); $config = $siteLanguage->toArray(); + // Harmonizing the namings from the site configuration value with the TypoScript setting + if ($key === 'flag') { + $key = 'flagIdentifier'; + } if (isset($config[$key])) { $retVal = $config[$key] ?? ''; } diff --git a/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php b/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php index 2249d75172e7..2c22a3ed8400 100644 --- a/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php +++ b/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php @@ -481,6 +481,8 @@ public function getFieldAsJson(string $content, array $conf): string $language = $site->getLanguageById((int)$conf['language']); if ($language->enabled()) { $language = $language->toArray(); + // Harmonizing the namings from the site configuration value with the TypoScript setting + $language['flag'] = $language['flagIdentifier']; } else { return $this->jsonEncode(null); }