react-localize-redux
react-localize-redux copied to clipboard
Translate component not working with options { defaultLanguage: "XX" }
Do you want to request a feature or report a bug? I am reporting a bug What is the current behavior? The Translate component is behaving as if the options props weren't passed.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
https://codesandbox.io/s/gracious-fast-w3tvo?file=/src/App.js
you can find an example, both with the component and the HOC method. Even though I am passing a different locale in the defaultLanguage
parameter, it shows the same translation as the initial one. Not like it is explained here, https://ryandrewjohnson.github.io/react-localize-redux/faq/#how-do-i-retrieve-a-translation-for-a-language-other-than-active-language
What is the expected behavior?
To return the translation belonging to the language of the parameter in { defaultLanguage: "XX" }
Which versions of react
and react-localize-redux
are you using?
React 16.12
React-localize-redux 3.5.3