Hi,
Welcome to the RStudio community!
I don't have all the data in order for me to run the app, but I think I know what you're looking for and made a dummy example. Next time, try and generate a reprex so we can actually build on top of your first attempt. Shiny debugging and reprex guide
Here is an example I made that might help:
library(shiny)
ui <- fluidPage(
titlePanel("Welcome to my app!"),
radioButtons("langChoice", "Language", choices = c("Lang X" = "langx", "Lang Y" = "langy")),
#Dropdown to translate
selectInput("myDropdown", "Choose", choices = "")
)
#Make sure the 'session' argument is set
server <- function(input, output, session) {
translations = data.frame(
id = paste("id", 1:5, sep = "_"),
langx = paste("XXX", 1:5, sep = " "),
langy = paste("YYY", 1:5, sep = " ")
)
observeEvent(input$langChoice, {
# Call the "updateSelectInput" and edit what needed
updateSelectInput(session, "myDropdown",
label = input$langChoice,
choices = setNames(translations$id, translations[,input$langChoice]))
})
}
shinyApp(ui, server)
Hope this helps,
PJ