diff options
Diffstat (limited to 'src/layouts/tool.layout.vue')
-rw-r--r-- | src/layouts/tool.layout.vue | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/layouts/tool.layout.vue b/src/layouts/tool.layout.vue index bdbb869..aa808f1 100644 --- a/src/layouts/tool.layout.vue +++ b/src/layouts/tool.layout.vue @@ -23,6 +23,11 @@ const head = computed<HeadObject>(() => ({ ], })); useHead(head); +const { t } = useI18n(); + +const i18nKey = computed<string>(() => route.path.trim().replace('/', '')); +const toolTitle = computed<string>(() => t(`tools.${i18nKey.value}.title`, String(route.meta.name))); +const toolDescription = computed<string>(() => t(`tools.${i18nKey.value}.description`, String(route.meta.description))); </script> <template> @@ -31,7 +36,7 @@ useHead(head); <div class="tool-header"> <div flex flex-nowrap items-center justify-between> <n-h1> - {{ route.meta.name }} + {{ toolTitle }} </n-h1> <div> @@ -42,7 +47,7 @@ useHead(head); <div class="separator" /> <div class="description"> - {{ route.meta.description }} + {{ toolDescription }} </div> </div> </div> |