l10n.register
Overview
- Register per-language text for a mod into a runtime StringTable and return its TextId. Use the returned TextId in data.patch for *TextId fields (e.g. DisplayNameTextId, DescriptionTextId). texts: JSON object of language code -> text, e.g. {"ko":"...","en":"..."}. Language codes: ko, en, ja, zh-CN, ... The text for the current game language is shown; missing languages fall back to en, then ko. The TextId is derived from the text content, so registering the same texts again returns the same TextId. Registered text is reverted on unmodding. Pass mod_id to also save it into that InGame mod (non_ufs/StringTableExport) so it is loaded again in later sessions. data.patch can do this inline: value={"ko":"...","en":"..."} on a *TextId field.
Metadata
| Field | Value |
|---|---|
| Display | Register Mod Text |
| Category | l10n |
| Access | Public |
| Scope | B1Standalone |
| Tags | — |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | yes | — | StringTable type (EB1StringTableType name), e.g. 'Object' |
| texts | string | yes | — | JSON object of language code -> text, e.g. {"ko":"...","en":"..."} |
| mod_id | string | no | — | InGame mod id. When set, the texts are also saved into the mod's non_ufs/StringTableExport. |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
text_id | string | yes | TextId to put into a *TextId field |
persisted_file | string | no | Saved StringTableExport file (only when mod_id was given) |
Usage
await inzoi.cli.execute('l10n.register', {
type: '',
texts: '',
mod_id: '', // optional
});