Skip to main content
Sonamu UI provides functionality to export and import i18n dictionaries as Excel files. Translators or planners can work in spreadsheets and apply changes all at once.

Excel Export

Exporting from Sonamu UI

  1. Access Sonamu UI (http://localhost:34900/sonamu-ui)
  2. Click i18n in the left menu
  3. Click the Export button in the top right
  4. Download the Excel file

Excel File Structure

Excel Import

Importing After Translation Work

  1. Perform translation work in the exported Excel file
  2. Click the Import button on the i18n page in Sonamu UI
  3. Select the Excel file
  4. Review and apply the changes

Import Behavior

The defaultLocale values for entity source directly modify the Entity’s title, prop.desc, and enumLabels.

Translation Workflow

  1. Development phase: Only write defaultLocale (ko) labels when defining Entities
  2. Translation phase: Excel export -> Deliver to translation team -> Import after translation is complete
  3. Maintenance: Repeat the same process when adding new keys

Handling Function Values

Function values are preserved as-is in Excel: During import, a value is saved as a function in these cases:
  • It is identical to the existing function for the same key in the dictionary file (ko.ts, en.ts). Re-importing an exported file keeps existing functions as they are.
  • It is a single arrow function expression with simple parameters and an expression body that uses only literals, template literals, its parameters, the plural/josa/format helpers, and safe operators and methods (for example (count: number) => \$ resultsβ€œ).
Functions in the second case cannot contain comments, a trailing semicolon, async, type parameters, a block body, or default, destructured, or rest parameters. Parameter type annotations are allowed. Only the plural, josa, and format.* helpers and the join, padEnd, padStart, slice, substring, toFixed, toLocaleDateString, toLocaleString, toLocaleTimeString, toLowerCase, toString, toUpperCase, and trim methods can be called. Any other value, including function-like code outside these rules, is saved as a plain string. Write more complex functions directly in the dictionary file. Editing and adding entries in Sonamu UI follow the same rule, and keys are always saved as strings. Renaming a key without changing its value keeps the function from the old key.
Imported values are written to the dictionary files that the dev server loads. Do not import Excel files from unknown or untrusted sources.

Important Notes

  • Key changes: Changing an existing key adds it as a new key; the original key is retained
  • Key deletion: Deleting a row in Excel does not remove it from the existing dictionary
  • Source change not allowed: Changes from entity to project are ignored
  • Empty values: Empty cells are ignored (the key is not removed from that locale)

Using the SD Function

Writing and using dictionaries

Entity Labels

Auto-extracted labels