Make WordPress Core

Opened 20 years ago

Closed 19 years ago

#188 closed enhancement (wontfix)

Add default language attributes to HTML tag.

Reported by: kitten's profile Kitten Owned by: matt's profile matt
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:


This patch adds the language attributes to the HTML tag and provides a option on the options-writing page for easy setting of the language attribute.

See: for more info.

Attachments (3)

0000188-default-lang-full-2.diff (11.0 KB) - added by Kitten 19 years ago.
0000188-default-lang-full.diff (10.9 KB) - added by Kitten 19 years ago.
0000188-default-lang.diff (3.4 KB) - added by Kitten 19 years ago.

Download all attachments as: .zip

Change History (5)

#2 @Kitten
20 years ago


This is a revision of my earlier patch. It adds the default language information to the blog, but also adds a per-post default language setting.

I think this is a simple and complete solution that should be rolled into 1.3 for multi-language support. I think this is important enough to be part of the WP core, and shouldn't be left to a plugin.

If there's interest, I'll prepare a patch file for v1.2. Just ask.

If anyone is interesting in applying this patch, (Linux instructions) cd to your wordpress folder (current CVS only), then type the command:
patch -p0 < /path/to/.diff/file

And you should see a report of the following files patched:
Adds template tags for default language, and post language.

Adds the editing box for the per-post language.

Adds the admin editing box for setting the default blog language.

Adds the necessary code so that the per-post language can be saved.

Adds the code to add the default option, and the column to the posts table to store the language. DB default is English.

Changes so that the 'Post Language' box looks the same as the others.

Adds function 'blog_language()' for displaying the default language in the <HTML> tag. A XHTML 1.1 compatible output is commented out for future use.
Adds function 'the_language()' for adding language info to the storycontent div.

Old index.php:
<html xmlns="">
<div class="storycontent">

New index.php:
<html xmlns="" lang="en" xml:lang="en">
<div class="storycontent" lang="fr">

#3 @Kitten
20 years ago


Now repspects the users language setting when setting the default when adding the column to the DB.

#4 @matt
19 years ago

  • Owner changed from anonymous to matt
  • Resolution changed from 10 to 90
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.