Closed tamas-ferenci closed 7 months ago
Hello,
You can specify custom text through the pickerOptions
function:
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
pickerInput(
inputId = "month",
label = "Select a month:",
choices = month.name,
multiple = TRUE,
options = pickerOptions(
actionsBox = TRUE,
selectedTextFormat = "count",
noneSelectedText = "Válasszon!",
noneResultsText = "Nincs találat {0}",
countSelectedText = "{0} elem kiválasztva",
maxOptionsText ="Legfeljebb {n} elem választható",
selectAllText = "Mind",
deselectAllText = "Egyik sem",
multipleSeparator = ", "
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
It works perfectly, thank you very much!
While
colorPickr
(for instance) has ani18n
option, I simply couldn't find the way to translate theactions-box
ofpickerInput
(despite the fact the every necessary translation seem to be available in the file https://github.com/dreamRs/shinyWidgets/blob/ae8dbf2a9d0225eb663f38060e2aad017fe9f900/inst/assets/bootstrap-select-1.14.0-beta2/js/i18n/defaults-hu_HU.js).