1

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 Answers2

1

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.

Lauri Nurmi
  • 566
  • 1
  • 3
  • 14
0

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

Václav Slavík
  • 6,445
  • 2
  • 28
  • 25
  • Doing this just creates a new file with the Spanish source text, not the English one – Lucas Farinazzo Marques May 30 '21 at 13:59
  • @LucasFarinazzoMarques You do realize you failed to mention that you want to change the *source* language, right? Even if you did this, such file would be of no use to you because the code you're translating wouldn't be able to find the translations... – Václav Slavík May 30 '21 at 17:09
  • Sorry if I didn't make myself clear. I have the source language as Spanish and the translation as English, now, I want to use this English translation as the source language in a new file – Lucas Farinazzo Marques May 30 '21 at 21:51