Appsilon / shiny.i18n

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

Support for clean (non html) text? #50

Open alopezo opened 3 years ago

alopezo commented 3 years ago

Hi,

Is this supported? Example:

titlePanel(windowTitle = i18n$t("Title"), title = "")

Would insert a on the page title:

image

dokato commented 3 years ago

hey @alopezo! To enable dynamic translations, we decided to wrap the text with a span that has a class that contains information about the current language. For this specific scenario, I suggest you use re-rendering the object on the server-side. See this example: https://github.com/Appsilon/shiny.i18n/blob/master/examples/live_language_change/server_app.R

I know it's not ideal, but before we come up with a more robust solution this should fix it.