Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#5393 closed enhancement (fixed)

language_attributes() template tag should be able to output lang and xml:lang attributes together

Reported by: ionfish's profile ionfish Owned by: ryan's profile ryan
Milestone: 2.5 Priority: low
Severity: minor Version: 2.5
Component: I18N Keywords: has-patch 2nd-opinion
Focuses: Cc:


The XHTML spec states that one should

Use both the lang and xml:lang attributes when specifying the language of an element. The value of the xml:lang attribute takes precedence.

Currently the language_attributes() function will only output one or the other, depending on the html_type option.

One way of dealing with this issue would be to add a parameter to the function allowing theme authors to specify that the template in which it is used is XHTML (since as far as I know there is no way to determine this through checking the WordPress backend).

Attachments (1)

language_attributes_xhtml.patch (1.1 KB) - added by ionfish 16 years ago.
Adds a doctype parameter to the language_attributes() function.

Download all attachments as: .zip

Change History (4)

16 years ago

Adds a doctype parameter to the language_attributes() function.

#1 @ionfish
16 years ago

  • Keywords has-patch 2nd-opinion added
  • Owner changed from anonymous to ryan

#2 @lloydbudd
15 years ago

  • Milestone changed from 2.5 to 2.4

#3 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6408]) language_attributes() improvements from ionfish. fixes #5393

Note: See TracTickets for help on using tickets.