Magento sets iso invalid language code in html header #11540
Labels
Fixed in 2.1.x
The issue has been fixed in 2.1 release line
Issue: Clear Description
Gate 2 Passed. Manual verification of the issue description passed
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Reproduced on 2.1.x
The issue has been reproduced on latest 2.1 release
Reproduced on 2.2.x
The issue has been reproduced on latest 2.2 release
Reproduced on 2.3.x
The issue has been reproduced on latest 2.3 release
Preconditions
Steps to reproduce
Expected result
<html lang="de">
Actual result
<html lang="de-DE">
This comes from the code in the constructor of framework/View/Page/Config.php
$this->setElementAttribute( self::ELEMENT_TYPE_HTML, self::HTML_ATTRIBUTE_LANG, str_replace('_', '-', $this->localeResolver->getLocale()) );
"de-DE" is no valid iso language code. (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
If you are using word-breaks with hyphenation in css like:
word-break: break-word; hyphens: auto;
You get the result that the hyphens aren't correctly set or no hyphens are set based on the wrong language code. With correct language code, in this case "de", hyphenation is working as expected with german language.
The text was updated successfully, but these errors were encountered: