Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R Shiny App internationalization [closed]

I want to make my R Shiny App multilingual, but I don't know, where to start from. Is there any libraries or Shiny widgets for switching the language in the Shiny App?

More generally, what are the best practices for internationalization in R? Is there any tutorials? I know, there is a gettext command, which comes from GNU gettext, but I'm not very handy with it. Should I read GNU gettext manual first (and what chapters will be enough for beginner)?

like image 311
Simeon Y. Avatar asked Sep 02 '17 20:09

Simeon Y.


2 Answers

I was looking to do the same thing and found this. The creator explains how it works and there is a github repository if you want to use his code in your app.

It works great for me as it's similar to the Zend Framework implementation which I had already used in the past.

like image 103
Polar Bear Avatar answered Oct 20 '22 16:10

Polar Bear


The projects I have found attempting to solve this issue:

  • https://github.com/Appsilon/shiny.i18n (28 stars, last activity 4 days ago, preparing for CRAN package publication)
  • https://github.com/chrislad/multilingualShinyApp (8 stars, last activity 4 years ago)

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 Translation of R script using gettext

like image 34
Motin Avatar answered Oct 20 '22 18:10

Motin