Translating a WordPress plugin is very much similar to translating a WordPress theme in your language. There are some minor differences that i have explained below.
If you are going to translate any plugin it means you already have working WordPress installed in your required language. If not then visit this link to install it. Also make sure plugin you are going to translate is translation ready.
We will be using POEdit app to translate our WordPress plugin so try installing it from related website and get it ready. I am using ‘Majestic-Recipes’ plugin from Majestic RecipePress WordPress theme as an example of this translation.
Mentioned plugin is fully translation ready and have languages directory in it which contains ‘majestic-recipes-en_US.po file that have all used strings and ready to be translated. If you are going to use French language for your theme then you have to rename it to ‘majestic-recipes-fr_FR.po’. You can find complete list of codes at Country Codes or Language Codes.
If your plugin doesn’t have translation .po file in it but is translation ready then you can create a file using poedit translate a WordPress plugin option. Reach to the plugin directory and let poedit create a language file for you.
The main difference in saving translation files for theme and plugin. In theme translation you have to use direct language code like fr_FR.po and in plugin you have to use plugin slug text domain with it like ‘majestic-recipes-fr_FR.po’.
After translating all strings you have to save the file. It will create .mo file with same name as you have .po. You have to upload both files in plugin languages directory. It will translate all strings related to that plugin if your WordPress is set that that same language of you translation files.