start
Table of Contents

csv2po and po2csv

Convert between CSV (Comma Separated Value) files and the TBX format for terminology exchange.

Usage

csv2tbx [--charset=CHARSET] [--columnorder=COLUMNORDER] <csv> <tbx>

Where:

<csv> is a CSV file
<tbx> is the target TBX file

Options (csv2tbx):

--charset=CHARSET set charset to decode from csv files
--columnorder=COLUMNORDER specify the order and position of columns (comment,source,target)

CSV file layout

The CSV file is expected in to have three columns, of which the default layout is

Column Data Description
A comment All the PO #: location comments. These are not used in the TBX files, and can be left empty, but could be generated by po2csv
B Source Language (English) The msgid or source string
C Target Language The msgstr or target language

Examples

These examples demonstrate the use of csv2tbx:

csv2tbx terms.csv terms.tbx

to simply convert terms.csv to terms.tbx.

To convert a directory recursively to another directory with the same structure of files:

csv2po csv-dir tbx-target-dir

This will convert CSV files in csv-dir to TBX files placed in tbx-target-dir.

csv2po --charset=windows-1250 csv tbx

User working on Windows will often return files in encoding other the Unicode based encodings. In this case we convert CSV files found in csv from windows-1250 to UTF-8 and place the correctly encoded files in tbx. Note that UTF-8 is the only available destination encoding.

Notes