I MANUALLY created a file: test.po with the contents:
msgid "greeting"
msgstr "Hello World"
Now I can edit the translation (hello world) in editors like "poedit" and "GTranslated" (I'm using Ubuntu). I can even add comments to that translation. However neither "poedit" and "GTranslated" will let me ADD a new translation string - I've looked online to no avail and looked at screenshots of other editors and none seem to have a "new" button.
What am I missing??? It seems stupid to have to edit new keys w/ a "plain" text editor and then edit them in these PO editors (whichever they may be). (If you can't tell I'm new to this 'gettext' world - I'm building a website in Zend/PHP.)
To edit PO files, you could use any (advanced) text editor (such as Sublime Text or Notepad++), any IDE software (such as VisualStudio Code and others), or just use Localazy, which was made specifically with translation file formats in mind.
Ctrl + F the original text that you want to change. Change it, and then save it. Then open the file with po edit again, and you will see the changed text.
A . PO file is a portable object file, which is text-based. These types of files are used in commonly in software development. The . PO file may be referenced by Java programs, GNU gettext, or other software programs as a properties file.
MO files are standard translation and language files, the Poedit software automatically lists the original string along with the translation. Note how the above document appears as it should, not jumbled or scrambled. To edit a string, simply click once to select the string + translation.
You should never be adding strings directly to a .po file; they will be added by msgmerge
from the .pot file generated by xgettext
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With