Open noah-nuebling opened 10 months ago
I think #1888 might be related
I found a workaround. It's also in the reproduction repo under /plugins/language-redirect-fix.js
Thanks for investigating and reporting this issue! This issue sounds similar to something I ran into while debugging a different issue in this comment.
Perhaps you have already tried wrapping the element that uses v-html
in <ClientOnly>
, this may also work as a workaround but renders after load which may not suit your use case.
I'm not sure yet what the root cause of this issue is, will look into this more later.
I encountered a similar issue, which might be related to this one.
// After executing generate, there is a pre-translation.
<h1>{{ t("website.title") }}</h1>
// But after using v-t generate, it is blank.
// After CSR, the translation appears, but this disrupts SEO.
<h1 v-t="'website.title'" />
Environment
Build Modules: -
Reproduction
http://localhost:3000/
in your browser.http://localhost:3000/de-DE
. In the background this will set a cookie that your language preference is German.http://localhost:3000/
again. This will now redirect you tohttp://localhost:3000/de-DE
, because of the cookie. But the text on the page will remain English instead of changing to German.Describe the bug
When users are redirected to a different language page, then the translations don't update correctly when using
v-html
with$t
while usingStatic Site Generation
.Additional context
v-html
like soIf you use
then the issue doesn't occur.
Logs
No response