How to translate a theme/plugin with Poedit (when you don't need multi-lingual)
To translate strings for any theme/plugin using Poedit, follow these universal steps:
- Download and install Poedit from the Poedit website.
- Connect to your website using FTP and navigate to the theme's/plugins folder, typically found at
wp-content > themes > your-theme-name > languages
orwp-content > plugins > your-plugin-name > languages
. - Look for the
.pot
file, which is the template for all translations. - Copy this
.pot
file and rename it to match your language and country code, for example,theme-name-lang_COUNTRY.pot
(e.g., for Romanian, it would betheme-name-ro_RO.pot
) orplugin-name-lang_COUNTRY.pot
(e.g., for Romanian, it would beplugin-name-ro_RO.pot
). - Download the renamed
.pot
file to your computer. - Open the
.pot
file with Poedit, translate the necessary strings, and save your changes. Saving will also create automatically two files:.mo
and.po
. Make sure they have the same name as the pot file. - Upload both the
.po
and.mo
files back to the languages folder of your theme/plugin on your server.
These steps can be applied to any WordPress theme/plugin to facilitate easy and efficient string translation.