Closed tapjdey closed 3 years ago
hey @tapjdey , thanks for using the package. To enable dynamic translations, we decided to wrap the text with a span that has a class that contains information about the current language. So they become non-character, but shiny tag objects that may cause some troubles when given as input to the objects that expect text.
Your may try to use the server-side translation instead: https://github.com/Appsilon/shiny.i18n/blob/master/examples/live_language_change/server_app.R This should help in your scenario.
BTW Also i18n$t
method should handle translations of vectors, so no need to call it separately for every entry ;)
Hi @dokato Thank you very much for your reply. Yes, that solved my problem :)
Hello, I was trying to create an instance of the Live language change on the browser side by following the examples. It works very well with the "label" elements of the widgets, but the option texts are not getting translated.
I'm attaching an example where I was trying to create a Likert scale widget using the "shinyWidgets" package, and the options are not playing well.
Code snippet below:
The complete code and translation files are pasted below for reference. Archive.zip
If you could suggest some way of fixing this problem, that would be great!