Skip to content

Commit

Permalink
Merge pull request #1298 from CommanderXL/feat-update-i18n-doc
Browse files Browse the repository at this point in the history
[docs]update docs
  • Loading branch information
hiyuki authored Oct 24, 2023
2 parents 391feab + 44f688a commit e452f8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs-vuepress/guide/advance/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ createComponent({
// 全局locale变更,生效范围为项目全局,locale 是一个 ref 变量
locale.value = 'zh-CN'
// 或者通过mpx.i18n来修改,也能起到全局locale修改作用
mpx.i18n.global.locale.value = 'zh-CN'
mpx.i18n.locale = 'zh-CN'
}, 1000)
return {
t
Expand Down Expand Up @@ -313,7 +313,7 @@ import mpx, { createComponent } from '@mpxjs/core'
createComponent({
ready () {
// 修改全局 locale
mpx.i18n.global.locale = 'en-US'
mpx.i18n.locale = 'en-US'
}
})
```
Expand Down

0 comments on commit e452f8d

Please sign in to comment.