WordPress.org

Make WordPress Core

#21724 closed defect (bug) (worksforme)

Bug: Invalid language subtag in Danish locale

Reported by: shitface Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.1
Component: Validation Keywords: reporter-feedback
Focuses: Cc:

Description

In the Danish locale of WordPress 3.4.1 the language subtag is invalid, according to RFC 5646. This makes the HTML invalid.

The W3C HTML Validator will give you an error similar to this:

Line 6, Column 29: Bad value da_DK for attribute lang on element html: The language subtag da_dk is not a valid language subtag.

<html dir="ltr" lang="da_DK">

Bloginfo -> 'language' is set to 'da_DK', but should be 'da', as of 2005.

Change History (2)

comment:1 SergeyBiryukov20 months ago

  • Keywords reporter-feedback added; needs-patch removed

Related/duplicate: #20291

With Danish package (or just having WPLANG set to da_DK), I get lang attribute with a hyphen, not with an underscore, in both admin and frontend:

<html dir="ltr" lang="da-DK">

Per W3C, this is correct: http://www.w3.org/TR/html4/struct/dirlang.html#langcodes

  1. Where exactly do you see the attribute with an underscore?
  2. Have you tried disabling all plugins and switching to the default theme (Twenty Eleven)?
Version 0, edited 20 months ago by SergeyBiryukov (next)

comment:2 nacin19 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.