Spreadsheets are exported from your project as comma separated values
CSV files will open in spreadsheet software such as Microsoft Excel, but without fancy text formatting. You can also upload CSV files into Google Docs.
Loco's CSV export places locales in separate columns, leading with the developer Asset ID. Each row corresponds to a separate translatable asset, as shown below:
Asset ID | English, en |
French, fr |
Spanish, es |
Notes |
---|---|---|---|---|
hello | Hello world | Bonjour tout le monde | Hola mundo | This is a welcome message |
goodbye | So long! | Au revoir | Adiós | This is a parting message |
The same format can also be imported into Loco.
Exporting glossary terms
In addition to the default CSV structure, you can export simple key/value pairs by selecting the "Glossary pairs" (dict
) format.
This is intended for importing unidirectional glossaries into third party systems such as Google Translate and has no header.
For the above example (in French) this would produce:
Hello world,Bonjour tout le monde
So long,Au revoir
By specifying multiple locales in this format, you can export equivalent term sets. The following format is commonly accepted as a glossary file, and requires a header row:
en |
fr |
es |
pos * |
description |
---|---|---|---|---|
Hello world | Bonjour tout le monde | Hola mundo | This is a welcome message | |
So long! | Au revoir | Adiós | This is a parting message |
* Loco doesn't currently support "part of speech" metadata, but the pos
field is present for future compatibility. When importing this format back into Loco, pos
is ignored.
API options
In addition to the documented API parameters you can also specify the following when exporting CSV files:
csv-separator
Use this parameter to specify an alternative field separator. The default is a comma, equivalent to"csv-separator=%2C"
. Escape the character as needed. For example%09
for tabs, or%3B
for semi-colons.csv-headless
Specify this to render the usual CSV format without a header row. It also removes the comment header lines..tsv extension
Use the.tsv
file extension (instead of.csv
) as a shortcut for exporting tab separated values.
See also
- Importing CSV files provides more detail on the supported file structure.