UNPKG
test-in-demo
Version:
latest (0.1.7)
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
## Project setup ``` yarn install ```
test-in-demo
/
src
/
languages
/
i18n.ts
17 lines
•
303 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import
{ reactive }
from
"vue"
import
{ createI18n }
from
"vue-i18n"
;
import
zh
from
"./zh"
;
import
en
from
"./en"
;
const
messages =
reactive
({
en
: { ...en, },
zh
: { ...zh, }, });
const
i18n =
createI18n
({
locale
:
"zh"
,
//定义默认语言为中文
messages })
export
default
i18n