Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#20291 closed defect (bug) (invalid)

html element "lang" bug

Reported by: ricardojvcruz Owned by: ricardojvcruz
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: I18N Keywords: has-patch
Focuses: Cc:


Wordpress core function "language_attributes()" is returning by example 'en_US' and should return 'en-US'.
This could be important when crawlers are parsing and indexing pages saving the parsed language found in that element.

Following w3c specification of html language attribute we can confirm that.

HTML 4.0 lang spec:

HTML 4.1 lang spec:

HTML 5 lang spec:

Change History (2)

#1 @toscho
9 years ago

  • Cc info@… added

I cannot reproduce this. In all installations I run and in some quick checks like http://wordpress.org/news/ I see en-US, not en_US.

#2 @nacin
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
			$output = get_locale();
			$output = str_replace('_', '-', $output);

That is what controls language_attributes().

Note: See TracTickets for help on using tickets.