Convert between Excel and PO files
Not all translators are comfortable with using PO-editors such as Poedit or translation tools like Transifex. For them this package provides simple tools to
convert PO-files to
xlsx-files and back again. This also has another benefit:
it is possible to include multiple languages in a single spreadsheet, which can be
helpful when translating to multiple similar languages at the same time (for
example simplified and traditional chinese).
The format for spreadsheets is simple:
The first row contains the column headers. “xls-to-po“ uses these to locale information in the file, so make sure never to change these!
Converting one or more PO-files to an xls file is done with the
This will create a new file
messages.xlsx with the Dutch translations. Multiple
PO files can be specified:
po-to-xls -o texts.xlsx zh_CN.po zh_TW.po nl.po
This will generate a texts.xlsx file with all simplified Chinese, traditional Chinese and Dutch translations.
po-to-xls will guess the locale for a PO file by looking at the
key in the file metadata, falling back to the filename of no language informatino
is specified. You can override this by explicitly specifying the locale on the
commandline. For example:
This will read locales/nl/LC_MESSAGES/mydomain.po and treat it as Dutch (nl locale).
You can also use the -c or --comments option with one of those choices: translator, extracted, reference, all to add more column in the output.
Translations can be converted back from a spreadsheet into a PO-file using the
xls-to-po nl texts.xlsx nl.po
This will take the Dutch (
nl) translations from
texts.xls, and (re)create a
nl.po file using those. You can merge those into an existing po-file using
a tool like gettext’s msgmerge.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|poxls-1.4.2-py2.py3-none-any.whl (9.2 kB) Copy SHA256 Checksum SHA256||3.6||Wheel||May 11, 2017|
|poxls-1.4.2.tar.gz (6.1 kB) Copy SHA256 Checksum SHA256||–||Source||May 11, 2017|