Skip to main content

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

FieldValue
DisplayRegister Mod Text
Categoryl10n
AccessPublic
ScopeB1Standalone
Tags—
Aliases—

Parameters

NameTypeRequiredDefaultDescription
typestringyes—StringTable type (EB1StringTableType name), e.g. 'Object'
textsstringyes—JSON object of language code -> text, e.g. {"ko":"...","en":"..."}
mod_idstringno—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:

FieldTypeRequiredDescription
text_idstringyesTextId to put into a *TextId field
persisted_filestringnoSaved StringTableExport file (only when mod_id was given)

Usage

await inzoi.cli.execute('l10n.register', {
type: '',
texts: '',
mod_id: '', // optional
});