qTranslate and localized permalinks

I have finally managed to migrate to “pretty” URLs. It was a real ordeal, basically only because of the fact that I’m using qTranslate for publishing in two languages. It was all about translating so called slugs – thingies that appear in a URL in place of the %postname% tag in permalink format.

I wanted slugs to be language-dependent. Using this post as an example, after changing the permalink format to /%post_id%/%postname%/ (and configuring qTranslate to use the pre-path mode for link generation) the permalink for English would be:


This is a bad solution as such a slug appearing e.g. in Google search results (remember that SEO is usually the main reason for using “pretty” URLs) wouldn’t say anything to an English-speaking user. I wanted the permalink for the English version of the post to look like this:


After many attempts with numerous plugins and patches I have managed to achieve this goal with the qTranslateSlug plugin. The problem was, though, that this plugin uses a separate MySQL table for storing multilingual slugs and this table’s records are not created during installation but rather while publishing or updating an entry or a page. So in order to “translate” the slugs for all my blog’s entries I had to open the post edit page for each and every one of them from the dashboard and click Update to enforce generation of translated slugs. To be honest, I can’t imagine such a migration for a blog with several thousand entries. Writing some kind of a script would be essential, probably – I haven’t dug deep into qTranslateSlug‘s code.

To sum up, I really can’t wait for WordPress to be natively multilingual.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s