Bug #89484

Use SiteLanguage hreflang for html-tag lang-attribute

Added by David Gurk about 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Frontend
Target version:
-
Start date:
2019-10-23
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Currently TYPO3 uses the iso-639-1 code for the html-tag lang-attribute like: <html lang="[iso-639-1]">

See:
https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/frontend/Classes/Http/RequestHandler.php#L294

While Google ignores this attribute, the lang-attribute could and should use the hreflang of the SiteLanguage configuration.


Related issues

Related to TYPO3 Core - Bug #90641: Setting hreflang to "x-default" break html-lang attribute Closed 2020-03-04

Associated revisions

Revision d2dfb8a6 (diff)
Added by Simon Gilli almost 1 year ago

[BUGFIX] Use Hreflang for HTML tag

With the introduction of sites the wrong siteLanguage attribute was
taken to generate the HTML tag lang attribute.

This patch changes this behavior and uses now the getHreflang getter
to fetch the correct value from the siteLanguage.

Resolves: #89484
Releases: master, 9.5
Change-Id: I5f2abf1d209993442141aa5f4638b4905c8cdf98
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62081
Tested-by: TYPO3com <>
Tested-by: David Gurk <>
Tested-by: Richard Haeser <>
Reviewed-by: David Gurk <>
Reviewed-by: Richard Haeser <>

Revision ff42b234 (diff)
Added by Simon Gilli almost 1 year ago

[BUGFIX] Use Hreflang for HTML tag

With the introduction of sites the wrong siteLanguage attribute was
taken to generate the HTML tag lang attribute.

This patch changes this behavior and uses now the getHreflang getter
to fetch the correct value from the siteLanguage.

Resolves: #89484
Releases: master, 9.5
Change-Id: I5f2abf1d209993442141aa5f4638b4905c8cdf98
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62062
Tested-by: David Gurk <>
Tested-by: TYPO3com <>
Tested-by: Richard Haeser <>
Reviewed-by: David Gurk <>
Reviewed-by: Richard Haeser <>

History

#1 Updated by Gerrit Code Review almost 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62081

#2 Updated by Simon Gilli almost 1 year ago

  • Category set to Frontend
  • Assignee set to Simon Gilli
  • % Done changed from 0 to 100
  • Complexity set to easy

#3 Updated by Gerrit Code Review almost 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62081

#4 Updated by Gerrit Code Review almost 1 year ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62062

#5 Updated by Gerrit Code Review almost 1 year ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62062

#6 Updated by Simon Gilli almost 1 year ago

  • Status changed from Under Review to Resolved

#7 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

#8 Updated by Simon Gilli 8 months ago

  • Related to Bug #90641: Setting hreflang to "x-default" break html-lang attribute added

Also available in: Atom PDF