summaryrefslogtreecommitdiff
path: root/src/router/index.js
diff options
context:
space:
mode:
authorDixsie Wolmers <dixsie@ibm.com>2020-01-31 05:58:37 +0300
committerGunnar Mills <gmills@us.ibm.com>2020-02-13 17:55:41 +0300
commitcbcd2136cd80395eff898738747c52c4b301fd56 (patch)
tree2d8af955bb96a5a0e8bec1cbc194debe2a777b0e /src/router/index.js
parentdb6fd25ff19210261f9b3ae25c6bcd383b5b836f (diff)
downloadwebui-vue-cbcd2136cd80395eff898738747c52c4b301fd56.tar.xz
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
Diffstat (limited to 'src/router/index.js')
-rw-r--r--src/router/index.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/router/index.js b/src/router/index.js
index 71b90fb1..bec7f548 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -5,6 +5,8 @@ import AppLayout from '../layouts/AppLayout.vue';
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 @@ const routes = [
path: '',
component: () => import('@/views/Overview'),
meta: {
- title: 'Overview'
+ title: 'pageTitle.overview'
}
},
{
@@ -26,7 +28,7 @@ const routes = [
name: 'local-users',
component: () => import('@/views/AccessControl/LocalUserManagement'),
meta: {
- title: 'Local user management'
+ title: 'pageTitle.localUserMgmt'
}
},
{
@@ -34,7 +36,7 @@ const routes = [
name: 'unauthorized',
component: () => import('@/views/Unauthorized'),
meta: {
- title: 'Unauthorized'
+ title: 'pageTitle.unauthorized'
}
}
]
@@ -44,7 +46,7 @@ const routes = [
name: 'login',
component: () => import('@/views/Login'),
meta: {
- title: 'Login'
+ title: 'pageTitle.login'
}
}
];