What to do if you have multiple 'useTranslations' in the same file? #1196
Unanswered
OguzcanKarakoc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider the following:
I have the following custom framework file:
You can see that the usageMatchRegex targets both "t" and "tCommon"
The problem I now have is the following:
because
const tCommon = useTranslations('common')
comes afterconst t = useTranslations("dashboard")
, both "t" and "tCommon" look at the "common" namespace. So for example my en.json would look like:instead of:
How would I fix this?
Beta Was this translation helpful? Give feedback.
All reactions