Update title when language switch

This commit is contained in:
2022-07-01 21:52:17 +02:00
parent b9571aaf3e
commit 9d58d29127
2 changed files with 10 additions and 2 deletions

View File

@@ -1,10 +1,14 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const { t, locale } = useI18n()
const title = useTitle()
title.value = `Fallback - ${t('error')}`
watch(locale, () => {
title.value = `Fallback - ${t('error')}`
})
</script>
<template>

View File

@@ -1,10 +1,14 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const { t, locale } = useI18n()
const title = useTitle()
title.value = `Fallback - ${t('maintenance')}`
watch(locale, () => {
title.value = `Fallback - ${t('maintenance')}`
})
</script>
<template>