i18next returnObjects in root of file

Viewed 345

i18next allows you to return the translation in an object rather than only one string of a key using something like: t('namespace:key1.key2', {returnObjects: true}) However i have yet to find a way to get the root of a namespace as an object. So in this example t('namespace', {returnObjects: true}) does not return the namespace in an object.

Is there a different way to get this done? Because otherwise i have to wrap every namespace that i have to access like this in a key so i can access it this way.

0 Answers
Related