Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Stop using 0 as default language ID #4241

Open
dkd-kaehm opened this issue Dec 2, 2024 · 0 comments
Open

[TASK] Stop using 0 as default language ID #4241

dkd-kaehm opened this issue Dec 2, 2024 · 0 comments

Comments

@dkd-kaehm
Copy link
Collaborator

dkd-kaehm commented Dec 2, 2024

The default language id may be not 0, but any defined by languageId in first entry of languages in site config.yaml, See also:

\TYPO3\CMS\Core\Site\Entity\Site::getDefaultLanguage()

    public function getDefaultLanguage(): SiteLanguage
    {
        return reset($this->languages);
    }

What should be done in the scope of this task?

All usages of 0 as default language id must be replaced by
$typo3SiteObject->getDefaultLanguage()->getLanguageId();.


Note: In TYPO3 core it is still not decided how to handle explicit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant