Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate component not working with options { defaultLanguage: "XX" } #203

Open
subharb opened this issue May 22, 2020 · 0 comments
Open

Comments

@subharb
Copy link

subharb commented May 22, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant