react-intl-phraseapp | Use react-intl with Phrase In-Context Editor | Internationalization library
kandi X-RAY | react-intl-phraseapp Summary
kandi X-RAY | react-intl-phraseapp Summary
react-intl-phraseapp is an addon for react-intl that lets you connect localized react applications to the Phrase In-Context Editor.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-intl-phraseapp
react-intl-phraseapp Key Features
react-intl-phraseapp Examples and Code Snippets
Community Discussions
Trending Discussions on react-intl-phraseapp
QUESTION
I could find a lot of examples of how to do internationalisation in a React application but I couldn't find any for a library of components.
I'm using phraseapp and I would like to know if someone has a suggestion of how to do it in a good way.
- All components receive as props the language that should use
- All translations are in phraseapp
- It's a library of components for the company that I work, so this library will have default labels that need translations
Options that I thought:
- Load the key/values for the current language in the apollo client store and create a helper to get the value given a key
- Try to use a lib like this: https://github.com/phrase/react-intl-phraseapp but I don't know if is going to work because is not a SPA
ANSWER
Answered 2019-May-22 at 16:00so we've finally ended up using react-intl
, exporting each component wrapped inside the IntlProvider
with whatever the locale and messages are just required. The config for IntlProvider is set in component's state inside a constructor:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-intl-phraseapp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page