All our themes is translation ready by default and comes with proper ".po" and ".mo" files. These file is located in "languages" folder of each theme.
PO files (Portable Object files) are gettext based files which consist of multiple entries holding the relation between original untranslated strings and their correpsonding translations. Entries usually belong to one project only, while the translations are expressed in a single target language.
Translation using .po and .mo files
- Download and install Poedit
- Go to /wp-content/themes/[theme name]/languages and open en_US.po file
- In the window that appears you have all the strings that were used in this theme, so you just need to go through them and write a translation
- When you're done go to File > Save as and save your translation in a *.po file
- The filename of your .po is crucial. Gettext uses the ISO 639 standard for language abbreviations and ISO 3166 for locales. If your translation is written in American English for example, your file name will look like en-US.po. Capitalization is also important here. For a full list of language and country codes, check out these two links: Gettext language codes, Gettext country codes
- Once you save, Poedit by default automatically creates a .mo file alongside your .po file. Put these files into "languages" folder
- Go to the Settings > General dashboard page. At the bottom you'll find language selector field. Just select your language and save settings. WP will automatically download missing system translations from special repositories. Theme translation will be applied too.
Translation with WPML plugin
All our WPML-compatible themes(check this point in description) packed with wpml-config.xml configuration file. This file tells to WPML what needs translation in theme and what not.
- For manage/translate all strings in your site, you will need WPML string translation module:
- Once, that module is installed, you need to go WPML > Theme and plugins localization, find on page option Select how to localize the theme and set it to Translate by WPML.:
- Now you can go to WPML > String translation and start translating your content.
Other plugins that can be used to translate theme
There is a simple list of some plugins that you can use to translate site:
- Unyson translate extension(free, built-in in unyson-compatible themes)
- WPML, paid
- PolyLang, free
- qTranslate, free