react translations
See original GitHub issuethink about how we can handle something like:
Нажмите <a onClick={this.handleClick}>здесь</a>.
maybe this can be an option
<translate>
Нажмите <a onClick={this.handleClick}>здесь</a>.
</translate>
extracted result
msgid "Нажмите <to>здесь<tc>"
msgstr ""
Example 2
Осталось: <span>{this.props.complainTextSymbolsLeft}</span>
{ungettext([' символ', ' символа', ' символов'], this.props.complainTextSymbolsLeft)}.
to - tag open tc - tag close
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:21 (21 by maintainers)
Top Results From Across the Web
Introduction - react-i18next documentation
react -i18next is a powerful internationalization framework for React / React ... The configuration options and translation functionalities like plurals, ...
Read more >How to translate your React app with react-i18next
You learn how to you can translate your React app with react-i18next. The tutorial also explains how to manage the translations json files...
Read more >react-translate
ReactTranslate does not give you a specific way to load translations, its goal is only to provide a way to pass translations down...
Read more >React-i18next: Internationalization and translation with ...
I18next is an internationalization framework which has been written for JavaScript. It provides a complete method for localizing the product as ...
Read more >Internationalization for react done right. Using the i18next ...
Needing a translation management? Want to edit your translations with an InContext Editor? Use the original provided to you by the maintainers of...
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
Whoa that was fast! I am currently on a trip with limited Internet connections, still catching up with
rt
. IfReact
dependency is required inevitably, I agree with the idea that it should be in a separate npm package.I have ended with something working here - https://jsfiddle.net/69z2wepo/72888/. Basically, we have
rt
tag, that can extract proper msgid and resolve translations from msgid with tags.Good part
It works)
Bad part
To be able to place translated strings inside react component, I need to modify read only
props.children
somehow. I couldn’t find any appropriate solution for that and used React.cloneElement(). This addsreact
as a dependency to the whole lib. This one is a bad thing, and I am thinking about moving React support to some kind of extension of c-3po. What do you think guys @MrOrz @alxpy ?