Appsilon / shiny.i18n

Shiny applications internationalization made easy
https://appsilon.github.io/shiny.i18n/
Other
168 stars 38 forks source link

[Bug]: Trouble translating HTML tags #83

Open shahronak47 opened 1 year ago

shahronak47 commented 1 year ago

Guidelines

Project Version

0.2.0

Platform and OS Version

No response

Existing Issues

No response

What happened?

I have a text which is like

HTML("This is a long text <br> with a line break")

This basically returns "with a line break" on next line since <br> is a line break. I want to translate the same using shiny.i18n however, that doesn't seem to work with HTML tags.

HTML(i18n$t("This is a long text <br> with a line break"))

It displays the same text in English even when I change the language.

This is how my translation csv looks

en, fr
This is a long text <br> with a line break, Ceci est un long texte <br> avec un saut de ligne

The rest of the translation works fine as expected.

Steps to reproduce

Run the translation code with HTML tags.

Expected behavior

Corresponding translation should be available for HTML tags just like the other ones.

Attachments

No response

Screenshots or Videos

No response

Additional Information

No response