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

Magento sets iso invalid language code in html header #11540

Closed
v0gler opened this issue Oct 18, 2017 · 5 comments
Closed

Magento sets iso invalid language code in html header #11540

v0gler opened this issue Oct 18, 2017 · 5 comments
Assignees
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

Comments

@v0gler
Copy link

v0gler commented Oct 18, 2017

Preconditions

  1. Using Magento 2.1.8

Steps to reproduce

  1. Using magento with german language

Expected result

  1. Html header of page should be <html lang="de">

Actual result

  1. Html header is <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.

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Oct 18, 2017
@magento-engcom-team
Copy link
Contributor

@SirElectro, thank you for your report.
We've created internal ticket(s) MAGETWO-82274 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed 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 labels Oct 19, 2017
@okorshenko
Copy link
Contributor

The issue has been fixed and delivered to 2.2-develop branch.

@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-82431

@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-82664

@sidolov
Copy link
Contributor

sidolov commented Aug 1, 2018

Hi @SirElectro. Thank you for your report.
The issue has been fixed in #17212 by @mageprince in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.15 release.

@sidolov sidolov added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

7 participants