30 Language support
The locale
argument of the config()
function allows one to render on-graph text using another language. Figure 30.1 shows how setting locale='ja'
will render text in Japanese.
today <- Sys.Date()
x <- seq.Date(today, today + 360, by = "day")
plot_ly(x = x, y = rnorm(length(x))) %>%
add_lines() %>%
config(locale = "ja")
Table 30.1 contains a list of all the supported locale codes and the language they correspond to: