Opened 8 years ago

Closed 6 years ago

#1081 closed enhancement (fixed)

Implement language tagging

Reported by: kim Owned by: shorty114
Priority: low Milestone: 2.1
Component: General Version: 1.5.1
Severity: normal Keywords: bg|dev-feedback bg|2nd-opinion
Cc:

Description

The attached patch implements specifying the language for WordPress content:

  • send Content-Language (as header and in a meta tag where already done for Content-Type)
  • specify text processing language in the <html> tag

This also fixes the issue that feeds always specify the language as "en" (the default value of option rss_language) regardless of the language setting of the blog (such as WPLANG).

The patch deprecates rss_language and introduces a new option called blog_lang. It can be modified on the Reading Options page, below blog_charset.

The default value for blog_lang is based on WPLANG (using "en" if WPLANG is empty).

Attachments (3)

blog-lang.2.diff (24.3 KB) - added by kim 8 years ago.
blog-lang.diff (24.3 KB) - added by kim 8 years ago.
multilang2.patch (9.8 KB) - added by kim 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1   kim8 years ago

  • Patch set to No

The current patch does not close the xml:lang attriute with a double-quote, thus breaking the page XHTML validity.

A fix is attached (needs to be applied over the first one)

comment:3   kim8 years ago

Thanks, idanso. I've uploaded a new blog-lang.diff that includes the fix.

kim8 years ago

  • Cc idanso removed
  • Keywords bg|dev-feedback bg|2nd-opinion added
  • Owner changed from anonymous to shorty114
  • Priority changed from normal to low
  • Status changed from new to assigned

The header() part would be easy, and why not just include the meta tag in wp_head hook?

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

Fixed by 3136, according to Ryan. Closed.

  • Milestone set to 2.1
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.