---
title: "ctx.i18n"
description: "The i18n instance for the current context; used to read or change the language. **Use [ctx.t()](./t.md) for all translated text**; do not use `ctx.i18n.t`."
---

# ctx.i18n

The i18n instance for the current context; used to read or change the language. **Use [ctx.t()](/runjs/context/t.md) for all translated text**; do not use `ctx.i18n.t`.

## Use Cases

Available in all RunJS environments (JSBlock, JSField, JSItem, JSColumn, event flow, linkage, etc.).

## Common Properties

| Property | Type | Description |
|----------|------|-------------|
| `language` | `string` | Current language code (e.g. `zh-CN`, `en-US`) |

## Common Methods

### changeLanguage(lng)

Change the current language.

| Parameter | Type | Description |
|-----------|------|-------------|
| `lng` | `string` | Target language code (e.g. `en-US`, `zh-CN`) |

**Returns**: `Promise<any>`, resolves when the language has been changed.

## Examples

## Notes

- **Translated text**: Use `ctx.t()` only; do not use `ctx.i18n.t`.

## Related

- [ctx.t()](/runjs/context/t.md): translation; use this for all copy

<!-- docs:splits:start -->

## Extracted references

- **Type Example** (`runjs/context/i18n__example-1.md`) - Extracted example from ctx.i18n
- **Read current language Example** (`runjs/context/i18n__example-2.md`) - Extracted example from ctx.i18n
- **Change language Example** (`runjs/context/i18n__example-3.md`) - Extracted example from ctx.i18n
- **Language switch button Example** (`runjs/context/i18n__example-4.md`) - Extracted example from ctx.i18n

<!-- docs:splits:end -->
