Skip to content

Support HTML in token string values for i18n directive #2

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

Closed
doshprompt opened this issue Jun 11, 2014 · 7 comments
Closed

Support HTML in token string values for i18n directive #2

doshprompt opened this issue Jun 11, 2014 · 7 comments
Assignees

Comments

@doshprompt
Copy link
Owner

No description provided.

@doshprompt doshprompt self-assigned this Jun 11, 2014
@doshprompt doshprompt changed the title Support HTML in token string values. Support HTML in token string values Jun 11, 2014
@doshprompt doshprompt removed their assignment Jun 17, 2014
@doshprompt doshprompt changed the title Support HTML in token string values Support HTML in token string values for i18n directive Jul 25, 2014
@doshprompt doshprompt reopened this Sep 23, 2014
@nikolaygit
Copy link

Is there any way I can render the HTML tags in my localizations files?

@doshprompt
Copy link
Owner Author

You mean something like this?

"helloWorld": "<b>Hello World!</b>"

I can get this done by the end of today if you need it in a hurry, or you can make a PR for this, you need to use ngSanitize and getTrustedHtml, and then do element.html instead of element.text similar to how ng-bind-html-unsafe used to do it.

@nikolaygit
Copy link

yes, this is what I mean. I would love to make a PR, but I don't have yet the AngularJS knowledge for it. I need such functionality until tomorrow (German time), but please don't feel obliged to add it so soon.

@doshprompt
Copy link
Owner Author

Alright, I'll see what I can do :) I'm always happy to help but just a little overbooked right now.

So you are saying you will need it after tomorrow German time correct?

@nikolaygit
Copy link

I just found out that I need also this feature #11 if I want to introduce i18n to my applications. So I guess their implementation would take some time/weeks. I will look at angular-translate and other modules if they offer such functionalities, if not then will have to wait :) Thank you for offering help! Would be awesome to have such features, so that developers with existing translations can use the module.

@doshprompt
Copy link
Owner Author

Take a look at #5 I will push this out today as well, please gimme a day before taking a look at other modules, you won't regret it :)

@nikolaygit
Copy link

Amazing! Thank you, Rahul!

@doshprompt doshprompt self-assigned this Feb 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants