We provide a free plugin that allows you to easily migrate sites from using qTranslate and qTranslate-X plugins to WPML. This plugin also helps you to clean up the database of any left-over qTranslate meta tags.
The qTranslate plugin works completely different than WPML. Instead of having different languages in different posts, qTranslate places all languages in the same post.
It does this by changing posts from, for example, Hello World to [:en]Hello World[:de]Hallo Welt[:].
When you uninstall qTranslate all these meta tags remain in your database.
Our migration plugin can do the following:
- Split content of different languages to different posts, allowing your site to run with WPML.
- Clean up your database from all the meta tags left over from qTranslate.
- Convert your qTranslate-powered site into a one-language site by removing all translations and leaving only the language you decide to keep.
You can download our qTranslate X Cleanup and WPML Import plugin from the WordPress repository.
If you are using the qTranslate Importer plugin without WPML, the output will be a site with just one language. The conversion process will ask you which language you want to maintain. All other languages will be deleted from the site.
This is useful if you have been experimenting with qTranslate and now you want to clean the database from all those language meta-tags.
At the end of processing, all posts will have just the one language that you choose.
How it works:
- Disable qTranslate and enable the qTranslate Importer plugin.
- Backup your database. Seriously, even if you’re just experimenting, you have to back up your database.
- Go to Settings -> qTranslate importer and choose the language that you want to keep.
- Click on the Clean button. This will go through all the site’s content and remove the language meta data from the content.
The plugin screen looks like this:
Choose which language you want to keep and accept the two checkboxes. Then, you can start the cleanup.
If you have WPML, the qTranslate importer will convert the site from all languages in one post to different languages in different posts. When the conversion is done, you’ll be able to use WPML on the site.
The best way to do this conversion is to disable qTranslate, enable WPML and the qTranslate importer and let it do everything automatically.
The import process will:
- Check which languages qTranslate had used and enable the same languages in WPML.
- Check which language permalinks you used in qTranslate and choose the same setting in WPML.
- Process all posts, taxonomy and custom fields and create separate ones for different languages.
- Produce URL rewrite rules that allow you to redirect incoming links to their new URLs.
To do this in a safe way, please follow these steps:
- Disable qTranslate and enable WPML and the qTranslate X Cleanup and WPML Import plugin.
- Backup your database. This is critical. You have to do this before running the import.
- Go to Settings -> qTranslate Importer and review the planned data conversion.
- Click on the Start button. This will go through all the site’s content convert it to use WPML.
The import screen looks like this:
As it runs, you’ll see the progress. Don’t interrupt the import process until it says “complete”. The screen should update every few seconds, as it processes 10 posts at a time.
Once the import completes, you’ll see this:
If you can edit the .htaccess file, copy everything from the .htaccess rewrite-rules box and add it to your site’s .htaccess file.
There’s a validate button which will read that file and check that you added the rules to the correct location.
Alternatively, you can add the redirect information to your theme. Click on the button to download the PHP file with redirect rules and save it in your theme’s folder.
Then, add the following line to the functions.php file in the theme:
include TEMPLATE_PATH . '/qt-importer-redirects.php';
This is a PHP statement, so it should go inside a <?php … ?> block.
Many sites that use qTranslate have used the language meta tags in various places, hard-coded in PHP or in option pages. Once you move away from qTranslate, you’ll need to use different ways to translate these strings.
First, locate them. Go through different admin screens in your theme and plugins that you’re using and see if there are any tags like:
<!–-:en–->English text<!–-:–-><!–-:fr–->French text<!–-:–->
Replace these with just the text in the default language.
Then, you can use WPML’s String Translation module to translate these to any language.
In case you need help maigrating from qTranslate to WPML, visit WPML’s support forum.