no message

Former-commit-id: aa5d410dddbfc6ef7f3b11ff237920c8f8e53a26
Former-commit-id: 72e841cf407495cbd0aa3f89d4b3eaddf6f91a71
Former-commit-id: 6899f78e5b4bd29026b7ba19c29cdea6625ce9f7
This commit is contained in:
李杨
2018-02-13 22:24:37 +08:00
parent bfa49fae3b
commit 9d89f28878
9 changed files with 29 additions and 5 deletions

View File

@@ -6,8 +6,8 @@ Vue.use(VueI18n)
export default new VueI18n({
locale: 'CN',
messages: {
'CN': require('./lang/cn'),
'JA': require('./lang/ja'),
'EN': require('./lang/en')
'CN': require('./lang/cn/'),
'JA': require('./lang/ja/'),
'EN': require('./lang/en/')
}
})

5
src/i18n/lang/cn/_pub.js Normal file
View File

@@ -0,0 +1,5 @@
export default {
pageHeader: {
demo: '示例'
}
}

View File

@@ -1,3 +1,6 @@
import pub from './_pub'
export const message = {
pub,
hello: '你好,世界'
}

5
src/i18n/lang/en/_pub.js Normal file
View File

@@ -0,0 +1,5 @@
export default {
pageHeader: {
demo: 'Demo'
}
}

View File

@@ -1,3 +1,6 @@
import pub from './_pub'
export const message = {
pub,
hello: 'Hello World'
}

5
src/i18n/lang/ja/_pub.js Normal file
View File

@@ -0,0 +1,5 @@
export default {
pageHeader: {
demo: 'サンプル'
}
}

View File

@@ -1,3 +1,6 @@
import pub from './_pub'
export const message = {
pub,
hello: 'こんにちは、世界'
}

View File

@@ -2,7 +2,7 @@
<Container>
<PageHeader
slot="header"
title="示例 1"
:title="`${$t('message.pub.pageHeader.demo')} 1`"
url="http://kazupon.github.io/vue-i18n/en/">
</PageHeader>
<DemoI18nControl></DemoI18nControl>

View File

@@ -2,7 +2,7 @@
<Container>
<PageHeader
slot="header"
title="示例 2"
:title="`${$t('message.pub.pageHeader.demo')} 2`"
url="http://kazupon.github.io/vue-i18n/en/">
</PageHeader>
<DemoI18nControl></DemoI18nControl>