When you need to create a custom translation for WordPress there are some tips:
- https://translate.google.com/toolkit
- http://poedit.net/
- Add a extra word to translation file
Googles Translation workbench
I found this to be pretty easy to translate whole files in order to translate wordpress plugins. Google suggest the translation and you just need to check / accept or improve.
Pay attentions to special codes used as Google puts in extra spaces which can cause errors.
After finishing the translation in Google workbench, download and open with POEDIT to fisnish.
https://translate.google.com/toolkit
Edit translations with POEDIT
POEDIT is really nice for editing translation files but if you want to create a new translation you are better of with Google Translation workbench as POEDIT will limit the translation suggestions in the free version.
Open the PO file (created with Google) and just the verify to check for errors and correct these. Then save the file. Default also the .MO file should be created. If not check preferences.
Once the files are created copy these to the correct translation folder of the theme or plugin where you created / edited the translation for. Make sure you have the right filename for your language.
Adding words to translations
So how I could not add words to the translation using the tools mentioned above. If a word is not translated maybe the translation is located in another PO file as different plugins have different translations files. Sometimes this is hard to spot..
If yo really need to add a word you can use a tekst editor and add manually the word that needs to be translated. Note you need to mention the file + line number correct. Copy an existing translation, past it and edit the translation.
Check the file in POEDIT and create the MO file by saving in POEDIT
A good online translation tool for .po files is https://poeditor.com/
You should give it a go especially if you are sick of managing language files, because it has a special WordPress plugin to streamline exactly this process in the localization workflow. You can download it from here: https://wordpress.org/plugins/poeditor/