Set up initial language translation
- Add i18n internationalization plugin
- Create json files for group 0 English and Spanish
- Uses $t method to set up initial translations on login page
- Meta title is translated using i18n in App.vue and PageTitle.Vue
Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: Ifce9f5e54d96f8b2a13239ad6178892f99fc4537
diff --git a/src/router/index.js b/src/router/index.js
index 71b90fb..bec7f54 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -5,6 +5,8 @@
Vue.use(VueRouter);
+// Meta title is translated using i18n in App.vue and PageTitle.Vue
+// Example meta: {title: 'pageTitle.overview'}
const routes = [
{
path: '/',
@@ -18,7 +20,7 @@
path: '',
component: () => import('@/views/Overview'),
meta: {
- title: 'Overview'
+ title: 'pageTitle.overview'
}
},
{
@@ -26,7 +28,7 @@
name: 'local-users',
component: () => import('@/views/AccessControl/LocalUserManagement'),
meta: {
- title: 'Local user management'
+ title: 'pageTitle.localUserMgmt'
}
},
{
@@ -34,7 +36,7 @@
name: 'unauthorized',
component: () => import('@/views/Unauthorized'),
meta: {
- title: 'Unauthorized'
+ title: 'pageTitle.unauthorized'
}
}
]
@@ -44,7 +46,7 @@
name: 'login',
component: () => import('@/views/Login'),
meta: {
- title: 'Login'
+ title: 'pageTitle.login'
}
}
];