Manage localization content
After the quick start, use these operations as needed to handle more content or work with translators.
Collect project content
On the main page, select Source language (original text), expand Configure collection group, choose the included directory, then select Collect and count. The game Demo can use the assets root.
| Setting | Use |
|---|---|
| Included directories | Select the assets root or a subfolder. An empty field does not mean all resources. |
| File extensions | Limit the scan to a file type when needed, such as ts. |
| Excluded directories | Exclude a subfolder from the included scope. |
The assets/ shown in directory fields is a project path prefix. After selecting the root with the picker, do not enter assets again. Exclusions should be subfolders under assets.
Collection can process scene and Prefab Labels, static l10n.t() calls in scripts, and image, audio, video and font assets. Repeating collection preserves existing localization associations and translations; a scan need not create new entries every time.
Read the confirmation before changing an established source language. Confirming saves the change immediately and affects subsequent collection and translation. Entries missing in the new source language may be copied from the old one without automatic translation, so review the new source text.
Add languages and edit translations
In the language list, select Add new language and search by name or locale. Complete source text opens the source language; Translate opens a target language.
The translation page has three categories:
- Untranslated / Missing source text: entries without saved content.
- Translated / Completed source text: entries with saved content.
- Imported files: content staged from translation files.
Select a row and expand Entry details to see its Key and associated resources. Enter a translation and select Save at the top right. The row may remain in its original category while you are typing; check Translated after saving.
Manual edits, automatic translation, imports, media matching and confirmed variants all produce drafts first. If you leave with unsaved changes, follow the prompt to keep editing or discard the draft.
Quantity variants
A sentence can change with quantity, such as 1 point and 2 points. Select Variant beside a text entry with a base translation and enter a complete sentence for each form offered by the language.
To display a number, keep in the sentence: for example, Score: point and Score: points. A variant can also omit the visible number.
Expand Test a quantity and enter 1, 2 or another quantity to see the chosen form and text. Languages have different forms: English commonly uses one and other, while Chinese usually needs one form. Custom conditions such as count > 100 are not supported.
Confirm in the dialog updates the draft; use page Save afterward. Clear variant translations also changes the draft only and preserves the base translation.
In the game, use L10nLabel's Count or l10n.t(key, { count: 2 }) to select a form. A regular Label does not switch by quantity automatically. See Scripting API.
Localize media
Different languages can use different images, audio, video or fonts. Import target assets into the project first, then select an asset in the target language's media entry, or enter its path relative to assets. Save the page afterward.
For assets/ui/zh-Hans/start.png, enter ui/zh-Hans/start.png. The path must resolve to an existing project asset. Text translation does not generate media files.
Match resources by path
For assets organized by language folders, select Match resources by path under Untranslated. Enter Find text in path and Replace with, check the scope, then continue.
For example, if both ui/en/start.png and ui/zh-Hans/start.png exist, replace ui/en/ with ui/zh-Hans/ to prepare the target media draft. Matching handles empty target media entries and preserves existing target associations. Review, save, then check the game output.
L10nLabel
L10nLabel links a scene Label to a text entry using its Key. Select the node and find the component in Inspector.
| Action | Use |
|---|---|
| Select | Search for and associate an existing text entry. |
| Generate | Prepare a new Key; the entry, source text and translations still need to be prepared. |
| Edit | Open Localization Editor to maintain the content. |
| Save / Reset | Appear after the Key changes; apply or discard the local Key draft. |
| Count | Supply the quantity used to choose a variant. |
Translation Save, Key Save and scene Save apply different changes. Editing a translation normally does not require a new Key.
Exchange translation files
A language row's Export supports PO, CSV and XLSX. Export All prepares a batch. Save translations before export and tell the translator which language to fill. Keep Keys and placeholders such as intact.
To receive work, open the correct target language, select Import file, review Imported files, then select page Save.
Handle conflicts
| Prompt | Action |
|---|---|
| Import conflicts | When an incoming file repeats Keys from already staged imports, skip duplicates, overwrite the draft, or cancel the import. |
| Catalog conflicts | When saving, explicitly select the project entries that may be overwritten, then select Save selected. |
Reopen the language after saving, check the values, then check the game. A complete backup also needs scene associations and project configuration; an exported table is not a complete project backup.
Manage languages and data
A target language row can delete that language and its translations. The source language cannot be deleted there. Export anything you need to keep and read the confirmation first.
Clear Data in the main page's actions removes target language data while keeping the source language. Clearing translation service configuration affects the service account settings separately.