The i18n instance for the current context. Use ctx.t() for translations.
| Property | Type | Description |
|---|---|---|
language | string | Current language code (e.g. zh-CN, en-US) |
Switch the current language.
| Parameter | Type | Description |
|---|---|---|
lng | string | Target language code (e.g. 'en-US', 'zh-CN') |
Return: Promise resolved after the language has switched.