π¦ Translation
Theme includes bunch of PO translation files for each languages so you can use standard translation tools to help translate theme output strings to your desired language.
WordPress language settingβ
For WordPress 5 or higher, please follow below steps
- Login to your WordPress Dashboard and navigate to
Settings > General Settings
- Make sure Site Language option is set to your desired language.
Storing translation filesβ
Theme use PO translation file which is industry standard translation method. In theme folder you will find a folder called languages. You will find each languages files store in the folder. By default storing inside theme folder. The theme language folder is wp-content/themes/{theme_name}/languages
.
*.POT
β A template file for translation
*.PO
β A lists of all text strings in theme. The text strings are in English and you can add translation to each of text string.
*.MO
β This is the compiled .po file and is used by WordPress to translate the theme
If your language isnβt included in the theme language files. You have to create a new .PO file from original {theme_name}.po
located in themeβs languages folder then save the new .PO file with your language code for example de_DE.po
This method has one downside. Because whenevery you update the theme. The whole language folder will be replaced with original version which overwrite your translation files. So the solution is to backup your translation file before updating theme.
Plugin translation filesβ
Some words are stored in the Gutenmate plugin, not in the theme. The plugin can be translated in the same way that themes are. The plugin language folder is wp-content/plugins/gutenmate/languages
.
Using Poedit applicationβ
Poedit application is the popular application uses to edit .PO file translation and itβs free. Click here to download Poedit application.
Now download and install Poedit application. Open language file you want to translate for example en_US.po
You will find all English string in Source Text box. Select text string you want to translate, add your translation text to Translation field. Once you finish translating. Save the file and it will automatically compiled to .mo
file.
- Open file
wp-content/themes/{theme_name}/languages/{theme_name}.pot
using POEdit - Click Create new translation button and choose the language.
- Translate the text.
- Hit save, a new .PO and .MO file will be created.
- Dont't forget to backup the created .PO and .MO files.
Rename/Change wordsβ
- Open file
wp-content/themes/{theme_name}/languages/{theme_name}.pot
using POEdit - Click Create new translation button and choose the English language.
- Change the words you want.
- Hit save, a new .PO and .MO file will be created.
- Dont't forget to backup the created .PO and .MO files.
Using WPML with the themeβ
WPML makes it easy to run a multilingual website with a single WordPress installation. It comes with over 40 languages. You can also add your own language variants (like Canadian French or Mexican Spanish) using WPMLβs languages editor. You can arrange different language contents in the same domain (in language directories), in sub-domains or in completely different domains.
You can find more information in getting started guide on WPML website.
Important WPML componentsβ
You can enhance your site translation process using these add-on plugins (please note: all of following add-ons are part of WPML Multilingual CMS package):
Translation Management With this component you can bring more organization into translation process of your site. You can view all types of content with translation status info in one place. Also you can manage people in your team or use translation service right from the translation dashboard. More information here: usage guide and feature overview.
String Translation This component helps you to translate anything that doesnβt fall inside posts, pages or taxonomy. This includes the siteβs tagline, general texts in Admin screens, widget titles and many other texts. More information here: module activation & first steps and slugs translation.
Need help for WPMLβ
If you need help with using WPML with TinySalt theme, please head over to WPML technical forum. Before posting about issues, we recommend that you review this quick checklist:
- Make sure you have the latest versions of the theme and of the WPML plugins, and that they are all activated. These include WPML Multilingual CMS, WPML String Translation and WPML Translation Management.
- Check that the problem does not appear if the WPML plugins are deactivated, and it does appear when only the core WPML plugins are activated.
Please always remember to search and read WPML official documentation for more details about how to use WPML.
RTL supportβ
For languages that read from right-to-left unlike English which is left-to-right, The theme will automatically switch to an RTL style, as long as you it's in your language and uses the correct locale (as explained above).