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

Allow to define a fallback value in Trans for cases not getting a translation #577

Closed
jamuhl opened this issue Oct 25, 2018 · 5 comments
Closed

Comments

@jamuhl
Copy link
Member

jamuhl commented Oct 25, 2018

Details: #462

@brodeynewman
Copy link

We use this project at work and we think it would be cool to be able to pass a prop into the Trans component as the fallback value. Is this what you're thinking?

If so, i'd like to go ahead and knock this out.

@jamuhl
Copy link
Member Author

jamuhl commented Nov 10, 2018

@brodeynewman you're aware that its about this case: #462 (comment) -> empty node, no translation found

the inner content of the node acts as fallback already and is also used as default value for save missing.

@jamuhl
Copy link
Member Author

jamuhl commented Dec 4, 2018

or just apply https://github.com/i18next/react-i18next/pull/462/files#diff-e2b8d52a3ffb2c5b61049216c69ff761R108 should not be to harmful adding that on major v9 as final

@jamuhl
Copy link
Member Author

jamuhl commented Dec 31, 2018

@jamuhl
Copy link
Member Author

jamuhl commented Dec 31, 2018

published in react-i18next@9.0.0

allow defining transEmptyNodeValue in i18next.options.react to set a default fallback value

@jamuhl jamuhl closed this as completed Dec 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants