Questions tagged [react-localization]
6 questions
22
votes
4 answers
How to implement localization in reactjs?
We need to implement the localization in reactjs to define the string
value(s). How can I implement that?
One link is there https://www.npmjs.com/package/react-localization, but I am not getting the correct steps to add that.
I have tried by…

Gorakh Nath
- 9,140
- 15
- 46
- 68
5
votes
2 answers
Make id in FormattedMessage from react-intl inherit from a custom TypeScript interface to enable VS IntelliSense and type checking
Given that react-localization does not have date and number format and is heavily dependent on one developer we decided to switch to react-intl because it seems safer in the long…

Ogglas
- 62,132
- 37
- 328
- 418
1
vote
2 answers
How to update a React component when mutating an object?
I'm using react-localization for i18n that uses an object with a setLanguage method. I'm trying to build a language switcher for it, but when I change the language, the component doesn't re-render with the updated object.
I've tried with useEffect,…

buzzb0x
- 629
- 1
- 7
- 10
0
votes
1 answer
Getting URL parameter in index.js in React
I am attempting to get a URL Param to set the correct locales for the whole app, using React.
I have been using queryString.parse(this.props.location.search) without problems inside the components, but it doesn't seem to work in the…

Eric Mitjans
- 2,149
- 5
- 40
- 69
0
votes
1 answer
React State Value Undefined When Assign From Location.State
I am parent component that got table, when user click on row, it needs to pass the object to Child component via history.push which is all working fine. I have define an object of same type in child component and trying to assign value which is…

K.Z
- 5,201
- 25
- 104
- 240
0
votes
1 answer
Context API failing to pass data in react-navigation 5
I'm trying to implement the Context API to react navigation 5 in order to pass the locale globally across the entire App.
I'm following the example shown in Expo documentation about localization:…

Butri
- 339
- 8
- 22