Does getFixedT work as expected/intended? #174
Nettsentrisk
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When setting up i18next options, you can set
fallbackNS
to act as a catchall so that all unmatched translation keys in specified namespaces will try to find a match in the fallback namespace, typically the "common" (or "translation") namespace.Yet when using
getFixedT
, it ignores thefallbackNS
you have set globally, and sets up a new one based on the namespace provided to the function. So there is no way to use the global i18next settings and translate server-side, it always overrides with what you specify when usinggetFixedT
.Seems like either it should use the globally set
fallbackNS
when usinggetFixedT
, or a new method/function should be provided that uses the global i18next settings, with the option of providing (an) additional namespace(s) to check for keys in when using it.What I'm forced to do now is add
"common"
in every namespace array I provide when usinggetFixedT
, which is cumbersome. Am I doing something wrong or is this working as intended?Beta Was this translation helpful? Give feedback.
All reactions