We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad567da commit 20dd656Copy full SHA for 20dd656
1 file changed
app/utils/i18n.ts
@@ -1,7 +1,9 @@
1
import { useI18n as useOriginalI18n } from 'vue-i18n'
2
3
export function useI18n() {
4
- const { t, d, n, ...rest } = useOriginalI18n()
+ const i18n = useOriginalI18n()
5
+
6
+ const { t, d, n, ...rest } = i18n
7
8
return {
9
...rest,
@@ -13,6 +15,6 @@ export function useI18n() {
13
15
14
16
export function wrapI18n<T extends (...args: any[]) => any>(t: T): T {
17
return <T>((...args: any[]) => {
- return isHydrated.value ? t(...args) : ''
18
+ return import.meta.server ? t(...args) : isHydrated.value ? t(...args) : ''
19
})
20
}
0 commit comments