-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Replace HTML tags tokens from translation #44
Comments
https://github.com/i18next/jquery-i18next#set-innerhtml-attributes does already what you ask for |
@jamuhl Thanks for answer. |
feel free to provide a PR improving the docs...(technically it's nothing else then setting innerHtml on an html element) |
@jamuhl Yes, sure. Wanted to ask one more thing. Maybe I am doing something wrong, but as an output I got this html code
Which looks like in the browser: Could you please advise me? Thanks! |
Here you have an example: jquery-i18next/example/simple/sample.html Line 19 in 9fe8b48
|
@adrai Thanks for providing link.
|
No, there is no Trans component for jquery-i18next |
@adrai Exactly, that's why this issue is the feature proposal :) |
There's no plan for that. Feel free to contribute with a PR if you like to. |
🚀 Feature Proposal
Implement Trans react component functionality for jquery
Let's assume that in translation I do have text like:
"userMessagesUnread": "Hello <1>{{name}}</1>, you have {{count}} unread message."
It would be nice if on client side code I can define by myself what kind of HTML tags I want to use for
<1></1>
So, usage will be:
Motivation
Using separation of concerns principle we don't need to store HTML tags directly in translations
The text was updated successfully, but these errors were encountered: