Hi,
we are developing a large shiny app that requires multilingual support. An obvious, but perhaps naive, method would be to create all texts server side, say via a lookup table, and use appropriate render functions. An alternative would be to use a client side js library like I18n. However, adding i18n attributes to already existing shiny functions etc. would be quite some work and extra code, which doesn't seem like the right approach. Furthermore, in ggplot2 labels etc. that approach wouldn't work and probably must be done server side.
Could you comment on what would be a fruitful way to approach this in a shiny context?
kind regards, Herman
ps: I'm aware of a previous item by Yihui i.e. (https://github.com/rstudio/shiny/issues/547) , but in that post there seemed no definite answer yet.
How are you envisioning the user would specify their language? A language chooser in the corner, perhaps?
something like that indeed. Typically a user will only use the app in one language i.e. we don't need to switch languages once the app runs.
The language could also be automatically detected based on the browser settings.
Is this item on the agenda for RStudio?
I would love to see I18N support in shiny.
The projects I have found around solving this issue:
It seems shiny.i18n is the best bet at the moment. I added an issue requesting support for gettext https://github.com/Appsilon/shiny.i18n/issues/15 as per the link in @yihui's comment.
Most helpful comment
The projects I have found around solving this issue:
It seems shiny.i18n is the best bet at the moment. I added an issue requesting support for gettext https://github.com/Appsilon/shiny.i18n/issues/15 as per the link in @yihui's comment.