Good by qTranslate, Long live Multisite

Writing a multilingual blog can be a pain. If you are online all the time, the options is not as bad. We used to like the qTranslate plugin. But the development seems to be lagging and from time to time it breaks the WordPress editor. Plugins like qTranslate have the advantage that you only need to worry about one site, one set of settings, language versions of you articles are connected by default. I was reluctant to move away from that. It was nice. But plugins like that cut deep into the guts of WordPress and cause problems.

Then WP 3.5 came, I forgot to check if qTranslate has been updated, did the update, which of course broke qTranslate. There’s a workaround, which you can find on the qTranslate forum. The fix was easy enough, now that we are sitting at a reasonably fast internet connection. But happens when we are sitting on some shitty connection? Even simple editing was troublesome with qTranslate. From time to time, the editor would not save your changes. The fix for that, I’ve learnt, is to switch to source editor. We simply need something simpler and more reliable. No offence meant.

So I made a leap and looked for a plugin to replace qTranslate. I’ve looked at WPML first. It’s not for free, but the cost is acceptable. Still it seemed rather complex. Then I looked further and found Multisite Language Switcher. It made me realize that the connection between translated versions of the articles is really only important for the writers, not so much for the audience. A regular reader would go to a site, pick a language and then continue reading that site in that language.

The new multisite feature of WordPress together with Multisite Language Switcher is good enough for our needs. And if the plugin brakes in the future, both language versions will not be affected, only their connection, which is fine.

The transition from qTranslate to MSLS was a bit painful and it took me couple of hours to get everything in order. But now all seems fine, seems there are no broken links.

First I did setup the multisite right at klubko.net. Read Create A Network to find out how to do it. Naturally I backed everything up first (actually I’ve tried all the steps on localhost using XAMPP). The tricky part in the installation of the network is the choice between subdomains and subdirectories. Go for subdirectories if you can. It’s simpler. If you can’t, like I couldn’t, because WordPress forced me to use subdomains, you have to work the DNS if your host allows you to do so. It didn’t work for me, so I simply forced the subdirectories and it works just fine.

To force the WordPress to use subdirectories for your network, finish the network setup, then open wp-config.php and replace

define( 'SUBDOMAIN_INSTALL', true );

by

define( 'SUBDOMAIN_INSTALL', false );

That should do it. Then I have made two copies of the exported SQL tables, one for the Czech version, one for the English one. In a text editor, I have used regular expression

<!--:cz-->.*?<!--:-->

to remove all Czech text from the English version and vice versa. Also remove the qTranslate tags that are left by. Then you just drop the posts database table in your respective sites that you have just created and import the stripped tables.

Then you are left with just a little bit of tweaking. We use the Atahualpa theme, it’s settings are easy to export and import. No big deal.

Your primary site will remain basically untouched so just take the tables for terms etc. and replace the secondary site’s tables with these. Check that the language is OK on both sites. For example the terms didn’t come out quite right for me, so I had to edit few manually.

Good luck.

2 comments to Good by qTranslate, Long live Multisite

Leave a Reply