-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not-found.tsx is not translated #67
Comments
@brunoscopelliti I replaced this file: import getT from "next-translate/getT";
const Page404 = async ({ searchParams }: any) => {
const t = await getT(searchParams?.lang as string, ["common"]);
return (
<div>Test: {t("label_1")}</div>
);
};
export default Page404; to: import createTranslation from "next-translate/useTranslation";
const Page404 = async () => {
const { t } = createTranslation("common");
return (
<div>Test: {t("label_1")}</div>
);
};
export default Page404; And now the translation works fine. The problem is that And related with this issue aralroca/next-translate#1118 is better to rename |
@aralroca Thank you for your advices. |
It's using the language of the dynamic route
Yes, this is the idea. Something like |
What version of this package are you using?
Node.js v20.5.0
What happened?
In the
not-found.tsx
page we see the label key, instead of the actual label content.Attaching a repro:
repro.zip
What did you expect to happen?
See the translated label.
The text was updated successfully, but these errors were encountered: