Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
front-end-dev
techbook
Commits
06855163
Commit
06855163
authored
Oct 31, 2019
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i18n初始化解析
parent
09e81e7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
main.js
src/main.js
+1
-1
No files found.
src/main.js
View file @
06855163
...
@@ -72,7 +72,7 @@ if(!window.sessionStorage.getItem("language")){
...
@@ -72,7 +72,7 @@ if(!window.sessionStorage.getItem("language")){
var
en
=
window
.
sessionStorage
.
getItem
(
"language"
);
var
en
=
window
.
sessionStorage
.
getItem
(
"language"
);
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
const
i18n
=
new
VueI18n
({
const
i18n
=
new
VueI18n
({
locale
:
en
,
// 语言标识
locale
:
en
||
"zh-CN"
,
// 语言标识
//this.$i18n.locale // 通过切换locale的值来实现语言切换
//this.$i18n.locale // 通过切换locale的值来实现语言切换
messages
:
{
messages
:
{
'zh-CN'
:
require
(
'./common/lang/zh'
),
// 中文语言包
'zh-CN'
:
require
(
'./common/lang/zh'
),
// 中文语言包
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment