Poedit
Translation with Poedit is a .po
file editing translation method.
This app provides the easy method to create new translations for any language, edit existing translations, synchronize strings and also generate the .mo file.
To edit .po file, follow the below steps:
- Open Poedit
- Choose “New from Po/POT file.”
- Select the pot file from
wp-content/themes/ciyashop/languages/ciyashop.pot
. For Plugin goto towp-content/plugins/pgs-core/languages/pgs-core.pot
- Select the new language you want to translate. Choose the country, (e.g., French) if you want the language in general, or if you want the more exact, select French (France) or French (Madagascar) to consider local dialects.
- Save the file with your language name, prefixed with the theme name, like “ciyashop-fr_FR.po“, pgs-core-fr_FR.po” for “French (France)” or “ciyashop-fr_MG.po“, “pgs-core-fr_MG.po” for “French (Madagascar)“. It will generate both a
.po
and.mo
files for your translation. - Place these files into the following folders
wp-content/languages/themes/
for theme Andwp-content/languages/plugins/
for plugin.
How to Update Translated Language File
When a theme is updated, and text strings are updated in the language files, then you can update your language translation file to sync with latest changes. For this follow below steps.
- Open Poedit.
- Open translated
.po
file of your desired language in POEdit. - Select Catalogue > “Update from POT file’ in top menu.
- In the opening file dialog, choose the
ciyashop.pot
file fromwp-content/themes/ciyashop/languages
andpgs-core.pot
file fromwp-content/plugins/languages
folder. The catalogue will then be auto updated with all the new text strings, and your custom ones will be preserved. - Save the file after updating and adding translations.
Note: Some strings come from the theme, and some come from the core plugin, which is the “PGS Core” plugin, So please make sure you also translate the plugin. Also, some string is dynamic, which directly comes from the input box ex. The widget titles, if you are using the header builder, then check the header-related setting in header builder itself.