Replies: 2 comments 2 replies
-
Your code snippet doesn't show the most important initialization part of lingui. Show what you do with |
Beta Was this translation helpful? Give feedback.
2 replies
-
Well, i don't know the reason for your exact problem, but the general guideline is to avoid "global" const Foo = () => {
useLingui();
return (
<>
<Head>
<title>{t`Foo` + " - My Website"}</title>
</Head>
</>
);
}; Use const Foo = () => {
const {i18n} = useLingui();
return (
<>
<Head>
<title>{t(i18n)`Foo` + " - My Website"}</title>
</Head>
</>
);
}; More info why it's like that is here: #1804 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using nextjs with babel with the code below, the title end up being indexed by DuckDuckGo like: "IV8fHF - My Website".
When I refresh the page in the blink of an eye I can see "IV8fHF - My Website" before it becomes "Foo - My Website". Am I missing something? Thanks!
linguijs version 4.7.0
Beta Was this translation helpful? Give feedback.
All reactions