by Tony Gamble
It’s a multilingual world out there. Sure, well over half of the websites on the Internet are written in English, but wouldn’t it be nice to offer your users a choice? In some cases, it may be an absolute necessity, especially if you’re offering public services in a culturally diverse city. Google Translate can sometimes bridge the gap, although stumbling through some of its machine-rendered translations can sometimes be both confusing and comical, or worse, misleading. Enter WPML – The WordPress Multilingual Plugin.
The way that WPML works is brilliantly seamless. Every good theme in the repository is built translation-ready, using a very simple hook wrapped around any text which appears on the page. If you’re building your own customizations, you just need to modify your HMTL like this:
<h1><?php _e(‘The Title’, ‘themename’); ?></h1>
For the rest of us, WPML adds a sidebar option when writing a Post or Page which allows you to easily add your own translation. Think of each Post as containing layers of additional languages. When you add a translation, WPML creates a relationship between the original Post and the translated one. When the user selects another available language using the Language Switcher widget, the same Post is reloaded but with the translated content. If there is no translation available, you can choose in the WPML options whether or not to display the default language or to hide the Post altogether.
WPML also offers much more advanced functionality and add-ons, such as delegating content for translation. While not free, it is well worth the $79 price tag ($29 for the entry-level version) and I highly recommend it.
Do you have a favourite translation plugin that you think could give WPML a run for its money? Let us know in the comments below.