Spreadsheets
CSV and Excel translation tables with key, value and description columns, plurals as one row per form, and Unity Localization string table CSVs.
| Format | Identifier | Extension |
|---|---|---|
| CSV | csv | .csv |
| Excel | xlsx | .xlsx |
| Unity CSV | unity_csv | .csv |
CSV and Excel share one table layout for one locale. Unity CSV is the multi-language sheet Unity's Localization package exports; transglot never guesses it, so choose unity_csv explicitly for those files.
CSV and Excel
"key","value","description"
"home.title","Bon retour","Home screen title"
"home.greeting","Bonjour, {name} !",""
"items[one]","{count} article","Item count in the cart"
"items[other]","{count} articles",""Columns
| Column | Required | Holds |
|---|---|---|
key | Yes | The key name. |
value | Yes | The translation, or one plural form. |
description | No | The key's description. |
- The first non-blank row is the header. Column names are matched without regard to case or surrounding spaces, in any order. Other columns are ignored with a warning; a header without
keyandvalueis an error. - Blank rows, and rows with an empty key, are skipped.
- A key that appears twice is an error.
- Excel files are read from the first worksheet only. Numbers, booleans and dates in cells are read as text. Very large sheets are refused above an import row limit.
- CSV files follow RFC 4180: quoted or bare fields, commas, line breaks and doubled quotes (
"") inside quoted fields, and CRLF, LF or CR line endings. A leading byte order mark (Excel writes one) is ignored.
Plurals
A table has no place for plural categories, so a plural key takes one row per category, with the category in square brackets after the key: items[one], items[other]. The rows are combined into one plural key on import.
- The bracketed suffix is read as a category only when it is one of the locale's plural categories. Any other bracketed suffix (
filters[advanced]) is part of an ordinary key name. - A key used both on its own and with a category suffix is an error.
- The description can be on any of the key's rows; the first non-empty one is used. On export it is written on the first row.
- A category the sheet leaves out is stored empty.
Formula safety
A cell that starts with =, +, -, @, a tab or a carriage return can run as a formula when the file is opened in Excel or Google Sheets. On export, such a cell gets a leading apostrophe ('=SUM(A1)) so it opens as text, and on import that apostrophe is removed again, so values such as +5 Gold round-trip unchanged.
Export
- Columns are always
key,value,description, in that order, one row per key (or per plural category) in byte order of the key names. - CSV exports quote every field, use LF line endings and UTF-8 without a byte order mark.
- Excel exports write every value as a text cell. An Excel file differs byte for byte between exports (the file is a zip with timestamps), but its contents are the same.
Unity CSV
The string table CSV that Unity's Localization package (com.unity.localization) exports and imports: a Key column, an optional Shared Comments column, and one column per language, named Language(code).
Key,Shared Comments,English(en),French(fr)
MainMenu_Play,Main menu button,Play,Jouer
MainMenu_Quit,,Quit,QuitterImport
The sheet is read for the locale you import:
- The value column is the one whose header ends in
(code)for that locale, such asFrench(fr)forfr, or whose header is the locale code itself. Codes match regardless of case and of-or_. A sheet with no matching column is an error. Keyis the key name and is required. A key that appears twice is an error.Shared Comments(orDescription) becomes the key's description.- Other languages' columns and per-language comment columns are ignored, each reported once.
- An empty cell for the locale is skipped, so it never clears an existing translation.
Export
An export has three columns, Key, Shared Comments and the locale code, which Unity's importer maps back to the language. Cells get the same formula protection as CSV. Unity models plurals as Smart Strings, which have no column in this sheet, so plural keys are left out; use csv, xlsx or gettext_po if you need plural forms in a file.