Skip to content

Commit b05460f

Browse files
committed
[TASK] Avoid using deprecated SiteLanguage->getTwoLetterCode()
TYPO3 v12.2 deprecated the `SiteLanguage->getTwoLetterCode()` method in favour of `SiteLanguage->getLocale()->getLanguageCode()`. This change migrates all occurances throughout the code base as an investment into the future. [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Deprecation-99905-SiteLanguageIso-639-1Setting.html#deprecation-99905-site-language-iso-639-1-setting [2] https://forge.typo3.org/issues/99905 [3] https://review.typo3.org/c/Packages/TYPO3.CMS/+/77597
1 parent ed3866d commit b05460f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Classes/ViewHelpers/DeeplTranslateViewHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public function render(): array
4444
) {
4545
if ($mode === self::GLOSSARY_MODE) {
4646
if (!DeeplBackendUtility::checkGlossaryCanCreated(
47-
$context->getSiteLanguage()->getTwoLetterIsoCode(),
48-
$siteLanguage->getTwoLetterIsoCode()
47+
$context->getSiteLanguage()->getLocale()->getLanguageCode(),
48+
$siteLanguage->getLocale()->getLanguageCode()
4949
)
5050
) {
5151
continue;

0 commit comments

Comments
 (0)