1

I have this dashboard and it's locale is currently set to english (see months names). I've tried, as you can see here, to set mac-os and R locale to pt_BR via:

      - name: change macos locale
        run: |
          export LC_ALL=pt_BR.UTF-8  
          export LANG=pt_BR.UTF-8

      - name: change R locale
        run: Sys.setlocale("LC_TIME", "pt_BR.UTF-8")
        shell: Rscript {0}

But still can't change it.

Alberson Miranda
  • 1,248
  • 7
  • 25

1 Answers1

1

I've had success changing the locale in a shinyapps.io dashboard as follows:

  1. Before you call rsconnect::deployApp, include in your R script

    options(rsconnect.locale.cache = FALSE, rsconnect.locale = "pt_BR.UTF-8")

  2. In your app.R file (or whatever file will actually be running on shinyapps.io), include the line

    Sys.setlocale(locale = "pt_BR.UTF-8")

As best I understand it, the first line tells shinyapps that it needs to have that language available, and the second tells R running on shinyapps to use that language.

Paul PR
  • 168
  • 10