next-intl problem
Unanswered
European hornet posted this in #help-forum
European hornetOP
Hey!
how can I use (t) function in Next.js application outside server or client component (like utility function)
in server component
i can get the translations like this
in client component like this:
but in utility function
like this
this is not work!
any help!
thanks
how can I use (t) function in Next.js application outside server or client component (like utility function)
in server component
i can get the translations like this
const t = await getTranslations()in client component like this:
const t = useTranslations()but in utility function
like this
const getLoginSchema = () => {
const t = getTranslations()
return .....
}this is not work!
any help!
thanks