Question

I only know how to add translations to .po and .mo files with poedit by clicking on UPDATE which scans .php files.

I can think of a couple of reasons for wanting to add lines without having to scan .php files first, eg: Being able to work in the .php files and the translation at the same time. I tried but I couldn't find how to do it. Apparently it isn't possible to do in poedit and opening .po and .mo files in notepad++ shows unintelligible icons.

How can this be done?

Was it helpful?

Solution

MO files are compiled PO files, you won't be able to edit those at all.

You can edit PO files in a text editor as they are plain text. The header will tell you what encoding the file uses, so if you see garbled text it is more likely that you encoding in your editor is wrong. The default is ISO-8859-1 and most PO file are now using UTF-8.

That said your reason for manually editing a file that needs to be autogenerated is only valid if your testing and debugging, in which case a text editor is fine. It might help if you have a text editor that can highlight PO file format.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top