nsMode global configuration option
See original GitHub issueDid something change with 6.x? Formerly, I could pass multiple namespaces into translate and I could use them without prefixes, understanding that the first key found would win. Now it is not finding my key, but it will if I prefix it.
So, from the example in the docs:
function TranslatableView(props) {
const { t } = props;
return (
<div>
<h1>{t('keyFromDefault')}</h1>
<p>{t('anotherNamespace:key.from.another.namespace', { /* options t options */ })}</p>
</div>
)
}
export default translate(['defaultNamespace', 'anotherNamespace'])(TranslatableView);
^^ works, but the following no longer does:
function TranslatableView(props) {
const { t } = props;
return (
<div>
<h1>{t('keyFromDefault')}</h1>
<p>{t('key.from.another.namespace', { /* options t options */ })}</p>
</div>
)
}
export default translate(['defaultNamespace', 'anotherNamespace'])(TranslatableView);
This would state (something like my log message) translation missing 'key.from.another.namespace' for en 'defaultNamespace'.
Am I missing a config option?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Solved: No Global Configuration Mode? - Cisco Community
I tried holding down the Mode button on reboot but it didn't seem to change anything. I'm just trying to gain access to...
Read more >Enable Use Source IP Mode - Citrix Product Documentation
The USIP global setting applies only to services that are created after the USIP global setting is made. ... enable ns mode USIP....
Read more >Using the Global Configuration Object - AWS SDK for JavaScript
There are two ways to configure the SDK: Set the global configuration using AWS.Config . Pass extra configuration information to a service object....
Read more >Configuration - Node-RED
The following properties can be used to configure Node-RED. When running as a normal application, it loads its configuration from a settings file....
Read more >21.4.3.1 NDB Cluster Configuration: Basic Example
Global configuration options are discussed later in this section. # my.cnf # example additions to my.cnf for NDB Cluster # (valid in MySQL...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you, this was my mistake.
I was looking here: https://www.i18next.com/configuration-options.html
And I should have been looking here: https://react.i18next.com/components/i18next-instance.html
I used the
reactaddition to options and it works fine.Just made a test: https://www.webpackbin.com/bins/-KvMK7GooEOLVwtqEzgq
app.js line 55 -> nsMode in translate options: works i18n.js line 40 -> nsMode in i18n options: works
(react-i18next@6.0.2)
Could you provide a webpackbin or more info where setting nsMode fails - seems i miss a case.