Maltpress

Web Development


Built by maltpress

Multilingual sites and custom themes

Just recently I’ve been doing some work on sites which needed translation. It’s not an uncommon thing, but it’s the first time I’ve really been involved in this kind of job, and I’ve learned a lot.

Firstly, I’ve discovered that some SEO people out there are very, very out of date in their thinking. Your SEO bod may tell you that, if you want a translation of your site, you’ll need to host your site in the country you’re targeting, so you need two versions of your site. This is wrong.

In 2009, Google said that this mattered. Let me emphasise that for you: in 2009 they said it mattered. And even then, they didn’t really say it mattered that much:

Let’s listen to what he says: as well as the IP address, TLD (.com, .de etc) is a factor. So you can host here with a .de and still be fine. You could do a WP Multisite setup with different languages and different domains, and be fine (by 2009 standards, remember!). Then he says the most important thing: you can overrule the IP-based location in Webmaster Tools. For specific parts of your site: subdomains or subdirectories.

And then, in 2013, Google themselves said this:

For search, specifically for geotargeting, the server’s location plays a very small role, in many cases it’s irrelevant. If you use a ccTLD or a gTLD together with Webmaster Tools, then we’ll mainly use the geotargeting from there, regardless of where your server is located.

And linked to this: https://support.google.com/webmasters/answer/182192?hl=en

Speed is basically the biggest thing you should be thinking about in terms of hosting location and, to be honest, most WordPress sites (and SME business sites) would benefit much more from speeding up in other ways: caching, removing needless plugins, using custom rather than premium themes, compressing images, that kind of thing. If you think moving hosting is a quick fix for your site speed, you’re wrong.

So, on to translation. I’ve been using WPML (http://wpml.org/) and, while the learning curve is a little steep at the start, it’s excellent. There are some things to really consider, though:

  1. Do your groundwork. Prepare your theme. Strings should be echoed using __e() rather than echo; no text should be hard-coded.
  2. Stuff like get_option, get_post_meta and so on work out of the box. It’s great.
  3. You get out what you put in. It’s not technically difficult to get your site translations working well – the documentation on WPML is great, and you only really need to know about one or two new functions – but you do have to do a lot of checking. There are also a lot of strings to translate on most sites – more than you’d realise.
  4. The translation service ICanLocalize seems to be pretty good – I’ve not had direct contact with the translators, but being able to submit strings and know that they’ll be translated without needing to go over any technical issues is great.
  5. Every now and then you’ll come across pages which are incorrectly marked as translated, for whatever reason. The only way to fix this seems to be to delete the translated version and then resubmit the original for translation, which is fine, but if that page is set to be the home page or blog page you’ll need to make sure these settings are re-done.
  6. Related to point 3, there are no magic bullets here. It’s possible, I’m sure, to just click a few buttons and to get everything translated as you’d expect, but with anything custom (or on any site where some page translations are late or not done) you may need to re-do some things manually. The automatic menu sync is great, but you’ll still need to re-assign some menu items. It doesn’t take long; it’s not difficult; but don’t assume you can just click and it’s all done (and don’t assume when it doesn’t work perfectly that there are problems or bugs).

Overall, I’ve been really impressed with WPML and doing translation. I’m interested to see what happens with Babble now they’ve been bought by Automattic, but it’s possible this buyout is more to do with talent than with incorporating Babble in to core or anything.

Back to blog



Leave a comment


By using this site you consent to our use of cookies. To find out more, see our privacy policy. Continue