I would like to localize the DataTable that I use in my Shiny app. I would like the user interface to be in Dutch. The code underneath with a Dutch language file works fine on my laptop, but when I upload the code to RStudio Cloud the user interface of DataTable is in English. Why is this and how can I fix it?
library(tidyverse)
library(DT)
library(shiny)
library(shinydashboard)
bevingen <- bevingen <- read_csv("https://raw.githubusercontent.com/FrieseWoudloper/shiny_workshop/master/data/bevingen.csv")
header <- dashboardHeader(title = "Mijn eerste Shiny app!")
sidebar <- dashboardSidebar(disable = TRUE)
body <- dashboardBody(DTOutput(outputId = 'tabel'))
ui <- dashboardPage(header, sidebar, body)
server <- function(input, output) {
dutch <- "http://cdn.datatables.net/plug-ins/1.10.19/i18n/Dutch.json"
output$tabel <- renderDT(
bevingen,
options = list(language = list(url = dutch))
)
}
shinyApp(ui, server)