# Why localization files break during engine import
Translation tables are simple to edit and surprisingly easy to damage. A comma inside a phrase, a missing pair of quotes, or one row with a different number of fields can shift every value to the wrong language column. A repeated key can be just as disruptive because the engine no longer has one unambiguous source string to import.Godot CSV translation importer expects a header row, a first column of identifiers, and consistent translation columns. Unity Localization package also uses CSV to exchange string table data with translators. This sanitizer gives you a small inspection pass before you hand a file back to an engine: it checks the shape, highlights unfinished cells, keeps the first copy of a repeated key, and writes a normalized export.# What the sanitizer checks
Detected before import
Problems that are hard to spot in a long translation table
- Empty language cells that still need a translation
- Repeated identifiers that would create ambiguous rows
- CSV records with missing or extra columns
- Quotes that do not follow the normal CSV field rules
Normalized for export
Small, predictable repairs that are safe to review
- Missing CSV cells are padded so every row matches the header
- Extra CSV fields are joined into the final cell and escaped
- The first row for a duplicate key is retained
- The original file remains untouched for comparison or rollback
# How to review a cleaned localization file
A clean parse is a structural result, not a language review. Use the findings list to locate missing work, then read the exported file in the engine that will consume it. Check that the identifier column is the column your project expects, that locale headers match the project settings, and that intentional empty values are understood by the runtime. The sanitizer does not judge grammar, placeholders, plural rules, or context-sensitive terminology.| Finding | What it means | Next action |
|---|---|---|
| Empty cell | A non-key column contains no text | Translate it or confirm that an empty value is intentional |
| Duplicate key | More than one row uses the same identifier | Compare the rows before keeping the exported first occurrence |
| Broken row | The row shape or quote syntax differs from the header | Review the normalized final cell and compare with the source |
| Parse error | The JSON structure cannot be read | Fix the syntax in a JSON editor before importing |
# CSV conventions that matter for game localization
The common CSV rules are deliberately modest: fields are separated by commas, records have a consistent field count, and a field containing a comma, a line break, or a quote can be enclosed in double quotes. A quote inside a quoted field is represented by two quotes. These details matter for translated phrases because punctuation is part of natural language, not a reliable delimiter.Keep the original beside the clean export
The export is a repair aid, not a replacement for source control. Keep the translator original file, inspect any broken row whose comma was joined into the final column, and run the cleaned file through the target engine before committing it to your project.- Translation key
- A stable identifier used by game code to request a localized string.
- CSV field
- One value between separators in a comma-separated record.
- Escaping
- The quoting convention that lets punctuation remain part of a value instead of becoming a separator.
- Locale
- A language and regional convention such as en, es, or ja used to select a translation column.