mirror of
https://github.com/ArthurDanjou/artdanj-fallback.git
synced 2026-01-14 11:54:03 +01:00
Update title when language switch
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user