diff --git a/web/src/utils/page.js b/web/src/utils/page.js index 6a3c6d843..dc78b0119 100644 --- a/web/src/utils/page.js +++ b/web/src/utils/page.js @@ -1,8 +1,9 @@ import { fmtTitle } from '@/utils/fmtRouterTitle' import config from '@/core/config' +import i18n from '@/i18n' export default function getPageTitle(pageTitle, route) { if (pageTitle) { - const title = fmtTitle(pageTitle, route) + const title = i18n.global.t(fmtTitle(pageTitle, route)) return `${title} - ${config.appName}` } return `${config.appName}` diff --git a/web/src/view/layout/header/index.vue b/web/src/view/layout/header/index.vue index ca92da404..d256a7442 100644 --- a/web/src/view/layout/header/index.vue +++ b/web/src/view/layout/header/index.vue @@ -40,7 +40,7 @@ v-for="item in matched.slice(1, matched.length)" :key="item.path" > - {{ fmtTitle(item.meta.title, route) }} + {{ t(fmtTitle(item.meta.title, route)) }}