ctx.i18n
The i18n instance of the current context, used for reading or switching languages. Use ctx.t() for translating text; do not use ctx.i18n.t.
Scenarios
All RunJS execution environments can use ctx.i18n (e.g., JSBlock, JSField, JSItem, JSColumn, Workflow, Linkage Rules, etc.).
Type Definition
Common Properties
Common Methods
changeLanguage(lng)
Switches the current language.
Returns: Promise<any>, resolves after the language switch is complete.
Examples
Reading the current language
Switching languages
Language switch button
Notes
- Translation text: Use
ctx.t()consistently; do not usectx.i18n.t.
Related
- ctx.t(): Translate text, use this method consistently.

