mirror of
https://github.com/ArthurDanjou/artdanj-fallback.git
synced 2026-01-14 15:54:04 +01:00
Update title when language switch
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
|
|
||||||
const title = useTitle()
|
const title = useTitle()
|
||||||
title.value = `Fallback - ${t('error')}`
|
title.value = `Fallback - ${t('error')}`
|
||||||
|
|
||||||
|
watch(locale, () => {
|
||||||
|
title.value = `Fallback - ${t('error')}`
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
|
|
||||||
const title = useTitle()
|
const title = useTitle()
|
||||||
title.value = `Fallback - ${t('maintenance')}`
|
title.value = `Fallback - ${t('maintenance')}`
|
||||||
|
|
||||||
|
watch(locale, () => {
|
||||||
|
title.value = `Fallback - ${t('maintenance')}`
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user