[wp-polyglots] is there a truly multilingual version of wordpress

Kimmo Suominen kimmo+key+wordpress.c4f53f at suominen.com
Thu Nov 10 10:22:44 GMT 2005


On Wed, Nov 09, 2005 at 12:43:26PM +0000, Stefan Magdalinski wrote:
> I'm working on a pan-european project where I need to produce
> multi-lingual versions of a blog. Not just a single non-english
> installation, but the blog itself has to support multiple languages, for
> the content as well.
> 
> Is anyone working on extending wordpress to support this? I read the
> internalization section on the codex, but without joy.

I'm posting in two languages on my site, and added the necessary support
for language selection to my running copy of WordPress 1.5.

You can find a patch that can be applied to 1.5.1.3 here:

ftp://ftp.gw.com/pub/people/kim/patches/wordpress/1.5.1.3/blog-lang-multi.diff

You should run the normal upgrade procedure after applying the patch, so
that the necessary database changes are applied.

The patch makes the following changes:
- adds a blog_language option (replacing rss_language)
- adds a post_lang field to posts, and the corresponding Language input
  field to the write screen
- automatic post selection based on the language settings of the browser
  (i.e. using the Accept-Language HTTP header), falling back to all
  languages if no posts satisfy the requested languages
- adds language indication to HTTP responses
- adds markup to the generated HTML/XML to indicate languages used

Configuration and use:
- set blog_language (Admin | Options | Reading) to either the most used
  language of the blog, or a comma separated list of languages; the first
  language in the list will be used as the default for new posts (if the
  author does not enter anything in the field); example: en, fi, sv
  (indicating English, Finnish, Swedish)
- when writing a post (Admin | Write) enter the appropriate language code
  in the Language input field (one language code only, not a list)

By design each post is in one language only.  If the same content is
going to be published in multiple languages, separate posts must be
created for each one.  This makes it easier when selecting the posts to
display for each request.

Note that this is a mod/hack/patch, not a plugin, so upgrading WordPress
will be more work, as you'd have to preserve the changes.  However, I've
used these changes since April 4th and made last adjustments on May 11th,
so I wouldn't expect many changes to the patch anymore.  I'm not working
on 1.6 yet, so I can't say when or how that upgrade from 1.5.1.3 will be.

What I plan to create in the next several months (I'm rather busy with
other things currently) is a plugin to leverage the theme redirection
hooks for selecting the preferred language version of the selected theme.
My current site uses a custom index.php still, and the "theme" parts of
the pages are mostly available only in English (using translated themes
seems like the easiest approach to improve the situation).

Regards,
+ Kimmo
-- 
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>



More information about the wp-polyglots mailing list