Skip to content

How can I get a translation outside of a component in NextJS13 #1089

Answered by aralroca
pepew-le-boss asked this question in General
Discussion options

You must be logged in to vote

Instead of metadata you can use :

export async function generateMetadata({ params }) {
  const t = await getT(params.lang, "homepage")
  return {
    title:t("main_title")
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
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
Labels
None yet
2 participants