Hi all,
I'm trying to render html text on a shinyapp which takes date inputs both from Sys.Date() and from a shiny dateInput(), and pastes it with input text onto a htmlOutput(). The idea is to then print all of this into a pdf.
Example code looks like this:
output_text<- function(input){
paste(
div(
br(),
p("Today is,", format(Sys.Date(), "%d de %B de %Y"), "and I am X"),
br())}
ui <- navbarPage(
tabPanel(
fluidRow(
htmlOutput("text"))))
server <- function(input, output, session) {
output$text <- renderUI({HTML(output_text(input))})
}
(I haven't run this example, as it's a short demo just to transmit the gist of the explicit problem)
I've looked into this, this, this, and gone through the rsconnect docs.
I've tried several approaches (separately and jointly):
- Changed my system locale on my Windows 10 machine to spanish.
- Changed locale in R with: Sys.setlocale("LC_TIME", "spanish")
- Ran on console and set in script (separately): options(shinyapps.locale.cache = FALSE)
- Ran on console before Sys.setlocale() and deployApp(): options(shinyapps.locale.cache = FALSE)
When I run the app locally, the html text prints the month name properly in spanish (e.g. "08 de Noviembre de 2019"), but when I push it to shinyapps.io (having tried different combinations of the above mentioned attempts, including changing my Windows locale to spanish), I still get the month name in English when running the app on shinyapps.io (e.g. "08 de November de 2019").
Can you please help me to solve this?
Thanks you.
Francis