Allow overriding keyPrefix in the TFunction #1802
ericfennis
started this conversation in
Ideas
Replies: 1 comment
-
Sorry, but what I still don't get is: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I opened issue in #1801, but @adrai was not convinced yet so he closed it. So I opened this discussion thread to see if maybe more devs wants this. So leave an upvote if you agree.
🚀 Feature Idea
Allow overriding the keyPrefix in the TFunction that is returned by the
getFixedT
function from the instance. This one used in the react-i18next useTranslation function.Motivation
It makes it possible to use a specific translation in a different namespace, but without the keyPrefix.
Currently it is possible to override the namespace in the T-function but would be nice to override the
keyPrefix
as well.The problem is when you using a keyPrefix in the useTranslation hook
Example
In a React component
Alternative solution what works now (but is not nice)
Beta Was this translation helpful? Give feedback.
All reactions