Trans component how to pass context?
See original GitHub issueWhen I use the useTranslation
hook I can use the t
function and pass it a context
.
How can I pass a context to the Trans
component too?
I couldn’t find it in the documentation.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Trans Component - react-i18next documentation
You can pass in variables to get interpolated into the translation string by using objects containing those key:values.
Read more >How to use the Trans component for bold or italicized text in ...
I am trying to use nested bold or italicized text in my JSON strings. For context, I have translation file called "homepage.json" which...
Read more >Common i18n patterns in React — LinguiJS documentation
For all other js macros (plural, select, selectOrdinal), pass ID as the first ... Sometimes you can't use <Trans> component, for example when...
Read more >Optimized components — LinguiJS documentation
Based on change of props and state, component can decide to continue re-rendering or skip the update completely. However, LinguiJS reads translations from ......
Read more >react-i18next | Yarn - Package Manager
12.1.0. context-less version of Trans component to be used for environments without react context 1588. 12.0.0. Update t function types to rely on...
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
correct link is: https://react.i18next.com/latest/trans-component#trans-props
tOption was existing for long…was just not documented
Awesome, thanks for the super quick response.