qTranslate-Plus migration
People who use qTranslate as their multi-language plug-in for WordPress run into trouble for a while. The Developer Qian Qin does not seem to work on the plug-in anymore. The last version is not compatible with the WordPress version 3.8.2 or higher. Fortunately Mirko Papa Salvatore from Prima Pagina in Italy forked qTranslate and provides qTranslate Plus.
So it is self-evident to migrate to qTranslate-Plus rather than WPML. Unfortunately the migration is not as easy as expected. This How-To describes the migration of a multi-language WordPress (WP) blog from qTranslate (qT) to qTranslate-Plus (qT+).
Preliminary
- Be sure that you use WP version 3.9 or higher. Otherwise upgrade. Backup files and database before you upgrade.
- Backup all files and your database of your current WordPress installation (even if you did it before you upgrade)
- Note all your qT settings
- Deactivate qT
- Deactivate all qT related Plugins, e.g. qTranslateMeta.
Install and setup qTranslate-Plus
- Download and activate qT+, e.g. via menu “Plugins|Add New”
- Pass the settings from qT to qT+
Migration of Themes
- Go to menu “Appearance|Editor”
- Open all files (on the right) one by one and search for the qT function calls. They start with “qtrans_”. Use the browser search function so you do not miss an entry. Set the prefix “pp” to every qT-function. E.g. “qtrans_getLanguage()” become “ppqtrans_getLanguage()”. Do this very carefully otherwise you run into problems after.
- Do not forget the styles files on the same page, e.g. styles.css. Add the prefix “pp” to every qT class, which starts with “qtrans_” as you did with the functions. Be careful with file paths. The path to qT+ is “qtranslate-xp”. E.g. replace “url(/wp-content/plugins/qtranslate/flags/de.png” to “url(/wp-content/plugins/qtranslate-xp/flags/de.png”.
Migration of Plug-ins
- If you use qT related plug-ins, e.g. qTranslateMeta, you have to add the pp-prefix to all qT function calls as described in “Migration of themes”. To edit the plug-in files go to “Plugins|Editor” or use a FTP program and your text editor of choice.
- Reactivate your qT related plug-ins and test your site
Troubleshooting
If you run into problems you may missed an old qT function call or CSS class. Double check the theme files. Other trouble maker are other plug-ins, especially qT-realated ones. Deactivate them one by one to find out which one is the trouble maker and check the qT function calls.