This tutorial shows how to translate your theme using WPML’s built-in translation interface. It works without any .mo files and you can edit translations from within WPML directly.
The video (3 minutes)
Steps to follow
- Go to the WPML menu and click on Advanced.
- Go to Theme localization.
- Select to translate the theme using WPML.
- Make sure that the language locales are set correctly and that the WordPress .mo files are found in wp-includes/languages.
- Review your themes strings and click to translate untranslated strings. This will send you to WPML String translation page.
- Click on translations, next to each string, translate and save.
Any edits that you make in WPML’s translation interface will appear in the site immediately. You don’t need to upload anything or change anything in the theme.
To work, the theme needs to be multilingual-ready. All strings need to be wrapped in gettext calls and have a textdomain argument. This is already standard practice for most WordPress themes. If you’re creating your own theme, you can check out the post about how to build a multilingual-ready theme.
- Theme localization in WPML’s getting started guide
- Building multilingual themes (the comprehensive guide)