Hello,
Is there a way to pass keys in dot notations instead of colon notations, in t() ?
For example: t('app.page.label') instead of t('app:page:label')
Thanks,
there is no colon notation
https://www.i18next.com/translation-function/essentials#accessing-keys-in-different-namespaces
above thats the default namespace is separated by : keys by .
you can override both using nsSeparator or keySeparator
were you able to get it working like needed? if so could we close this? or else please paste your i18n.init call
@skbhardwaj I was able to get dot notation working with this:
File: i18n.js
const options = {
...
keySeparator: false,
...
},
};
In detail explanation can be found here: https://react.i18next.com/guides/step-by-step-guide#3-sidequest-natural-vs-keybased-catalog
If you like this module don鈥檛 forget to star this repo. Make a tweet, share the word or have a look at our https://locize.com to support the devs of this project -> there are many ways to help this project :pray:
Most helpful comment
@skbhardwaj I was able to get dot notation working with this:
File: i18n.js