Is it possible to create a new .po file from a translation?

377 Views Asked by At

I have a .po file in which the source text is in Spanish and the translation is in English.

I've tried checking around to get this English translation and create a new .po file from it to be translated into Brazilian Portuguese, but I couldn't find anything in POEdit to do so.

Is there any way to do this?

Edit: Just to be more precise, I have the source language as Spanish and the translation as English. I want to use this English translation as the source language in a new file

2

There are 2 best solutions below

0
Lauri Nurmi On BEST ANSWER

It is more or less possible to achieve by using the msghack tool on command line.

Like this:

msghack --invert en.po > inv.po
msghack --empty inv.po > yourapp.pot

Duplicate translations are apparently silently ignored when inverting; this may not be a problem, but better be aware of that.

3
Václav Slavík On

See the File → New from PO/POT file… menu.