Appsilon/shiny.i18n

[Bug]: Trouble translating HTML tags

Opened this issue · 0 comments

Guidelines

  • I agree to follow this project's Contributing 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