For translating WordPress themes and Plugins follow the below steps:
Firstly Download Poedit. It’s available for free on poedit.net. and install it.
1. Open Poedit and select File > New Catalog from POT / PO file.
2. Select the .POT file or the .PO file from the theme or plugin you wish to translate which (you can find the files in the wp-content/themes/your- theme/language[or lang]).
See image ↓
3. A box will pop up asking for language of the translation. Select your language:
4. Hit OK and Poedit will name automatically your file. For example: If you select Spanish (Spain) file name will be- es_ES.po
5. Save your file in your Theme Directory.
6. Now open Themes Po file In poedit and follow image instruction-
7. Now Fill the Details as below images.
8. Now Update and Save the changes, See the image-
You can see Themes Default data in the editor.
8. Now you can start translating your THEME . The space at the top will display all the text ready to translate, and any completed translations will display to the right. The boxes underneath show the source text, your translation and any notes for translators. Translating is really easy – just select a word or phrase, enter your translation and click “Validate”.
7. Now Update and Save your po edit file.
8. Go to Admin Dashboard >> Setting >> General >> Site Language
Select language from here For example-Sapnish and save the changes.