Replace 'gsw-berne' (Swiss German language) with 'gsw' (W3C compliant)

Created on 18 November 2019, almost 5 years ago
Updated 6 April 2023, over 1 year ago

Problem / Motivation

The wrong (by W3C) head hreflang="gsw-berne" HTML tag:

<link rel="alternate" hreflang="gsw-berne" href="https://www.domainXXX.com/ch/ihr-spezialist-fur-abdichtungen-und-markierungen" />

which is reported by W3C as an error (attached screenshot):

Error: Bad value gsw-berne for attribute hreflang on element link: Bad variant subtag berne.

From line 22, column 1; to line 22, column 128

<link rel="alternate" hreflang="gsw-berne" href="https://www.domainXXX.com/ch/ihr-spezialist-fur-abdichtungen-und-markierungen" />↩<link

Proposed resolution

There are two variants for the issue fix:

1. Patch the core language version #3 🐛 Replace 'gsw-berne' (Swiss German language) with 'gsw' (W3C compliant) Needs work . For new projects.

2. Modify the output only ( #9 🐛 Replace 'gsw-berne' (Swiss German language) with 'gsw' (W3C compliant) Needs work ). More suitable for existing (old) projects.

Both of the patches replace core language hreflang="gsw-berne" (German Swiss language) with hreflang="gsw" (W3C compliant).

🐛 Bug report
Status

Needs work

Version

10.1

Component
Language system 

Last updated 1 day ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇧🇬Bulgaria vuil Bulgaria 🇧🇬 🇪🇺 🌍

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024