I'm trying to use the poswap from Translate Toolkit.
My input file is he.po
(Hebrew) and my output file is ar.po
(Arabic)
The result of the following command poswap he.po ar.po
, is a new ar.po
file where the source is hebrew and the translation is arabic.
BUT, when I open the file using poedit
all of the source strings encoding fail to comply. Its definitely not utf-8
anymore..
Does anyone notices that behavior before?
I had this problem before.
If you open the ar.po
file using a text editor, you will see there is a difference between the file headers.
That's because poswap
is not converting the poedit header as well.
To solve this, just open ar.po
file using any file editor and add the following to the top:
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Notice the "Language: ar\n"
line.
This will ensure the po file will have the proper headers.
Good Luck!