i18nPlugin
i18nPlugin copied to clipboard
Default ns
I have a proposal to add default ns in plugin configuration.
In case when I have translation with one ns only - I use t('TRANS_KEY')
, but en.json
file has translation keys under default ns.
Example: my default ns is translation
, plugin expects t('translation.TRANS_KEY')
, but in code it's t('TRANS_KEY')
.
Not quite right: if you set default ns to "translation" then keys in default namespaces expected to be t('TRANS_KEY'), not t('translation.TRANS_KEY'). Try to set default ns to 'en'. Then keys like 'TRANS_KEY' will try to resolve in en.json