Update i18n.md
This commit is contained in:
parent
bf9a2e2647
commit
d5a3806148
@ -23,7 +23,7 @@ export class MyPlugin extends Plugin {
|
|||||||
|
|
||||||
### app.i18n
|
### app.i18n
|
||||||
|
|
||||||
全局 i18n 实例,一般用于 CLI 中国。
|
全局 i18n 实例,一般用于 CLI 中。
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
app.i18n.t('World') // “世界”或“World”
|
app.i18n.t('World') // “世界”或“World”
|
||||||
@ -66,7 +66,7 @@ i18n.addResources('zh-CN', 'your-namespace', {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
为了更方便管理多语言文件,推荐在插件中创建一个 `locale` 文件夹,并把对应语言文件都放置在其中方便管理:
|
为了更方便管理多语言文件,推荐在插件中创建一个 `locale` 文件夹,并把对应语言文件都放置在其中:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|- /my-plugin
|
|- /my-plugin
|
||||||
|
Loading…
Reference in New Issue
Block a user