Skip to content

Should give error when langSelectorInput is not defined in UI #14

@jpmarindiaz

Description

@jpmarindiaz
library(shiny)
library(shi18ny)

ui <- fluidPage(
  useShi18ny(),
  #langSelectorInput("lang", position = "fixed"),
  h1(ui_("hello")),
  uiOutput("results")
)

server <- function(input, output, session) {
  i18n <- list(
    defaultLang = "en",
    availableLangs = c("es","en")
  )
  lang <- callModule(langSelector,"lang", i18n = i18n, showSelector = TRUE)

  output$results <- renderUI({
    list(
      h2(i_("language",lang()), ": ", lang()),
      h1(i_("hello",lang()))
    )
  })

}

shinyApp(ui, server)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions