How can I get a translation outside of a component in NextJS13 #1089
Answered
by
aralroca
pepew-le-boss
asked this question in
General
-
I've came across the Here's an example:
I get the following error: My question is do I need to use another function or do I need to configure my project so I can use top-level awaits ? |
Beta Was this translation helpful? Give feedback.
Answered by
aralroca
Jun 26, 2023
Replies: 1 comment
-
Instead of metadata you can use : export async function generateMetadata({ params }) {
const t = await getT(params.lang, "homepage")
return {
title:t("main_title")
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pepew-le-boss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of metadata you can use :