Skip to content
Snippets Groups Projects
Commit 85d2b5b1 authored by Benni Mack's avatar Benni Mack
Browse files

[TASK] Re-introduce hreflang attribute of site language configuration

The site language's configuration setting "hreflang" was
deprecated with #99908, however, it still serves a valid purpose.

If working with EXT:seo and the <link rel="alternate"> tags,
it is still valid and possible to set a specific "hreflang" attribute.

Example setups:
* You have "German (Germany)" (which is using de-DE as locale)
  and "German (Austria)" (which is using de-AT as locale).
  here you want to set "de" as generic fallback in the "de-DE" locale
  when using hreflang attributes.
* You want to explicitly set "x-default" for a specific language,
  which is clearly not a valid language key.

This change does the following:
* It re-adds the hreflang property to be managed by the UI, however
  it is empty by default and will fallback to the $locale->getName().
* It is not used within the <html lang="..."> attribute anymore as this
  was a mis-use in the first place (and now properly using just the
  language key, see
  https://www.w3.org/International/questions/qa-html-language-declarations.en.html#attributes
* The method "SiteLanguage->getHrefLang()" is not deprecated anymore.
* The RST is adapted accordingly

Still, the relevant information is: The site language configuration
option "hreflang" is not relevant anymore for regular websites without
rendering hreflang tags, but is now customizable, and has a proper
fallback.

Resolves: #101160
Resolves: #95798
Related: #99908
Releases: main, 12.4
Change-Id: Ifc5b5b10ba46b4da4abd5c504d4d69f240f2fd02
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79488


Tested-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarThomas Hohn <tho@gyldendal.dk>
Tested-by: default avatarJochen <rothjochen@gmail.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarJochen <rothjochen@gmail.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 68d4f80c
No related merge requests found
Showing
with 37 additions and 32 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment