Translation Preparation
Last updated
Last updated
There are several ways to fill up translations. One of them is using the PoEdit platform. You can add translation via editing your .po file and at the end, PoEdit generates a .mo file for you. Then you need to upload ready translation files to primordial folder (wp-content/themes/companion/languages/).
The easiest way of translating the theme is by using the Loco Translate plugin. Loco Translate is a free plugin and can be installed from the default repository of WordPress.
Static strings are available in the Companion theme, as well as in such plugins as Companion Configurations, and Companion Elementor Widgets plugins. Therefore, in this manual, we will consider how to translate strings and keep translations up to date in these plugins.
Also, it is possible to translate any other plugin with the help of Loco Translate.
To install the plugin, go to Dashboard and find the Plugins section from the left menu and choose Add New.
You need to search Loco Translate, install it, and activate it on the opened page.
Go to Loco Translate > Themes and choose Companion. Here you can create your own language to translate the not editable content of the theme. Create a language by clicking New language.
Important!
It is required to store the translation file in the “.../wp-content/languages/themes/” folder to keep translation during the theme updates.
After clicking the Start Translation button, you will be directed to the Loco Translate editor where you can start translating the theme strings.
You need to prepare for translations installed plugins like Companion Configurations and Companion Elementor Widgets. The process of plugin translation is very similar to the theme.