mwTranslations: Translate UI titles and labels

Description Usage Arguments Value Examples

View source: R/translations.R

Description

Creates a list of translation strings that can be passed to function manipulateWidget to translate some UI elements.

Usage

1
2
3
4
5
6
7
8
mwTranslations(
  settings = "Settings",
  chart = "Chart",
  compare = "Compare",
  compareVars = "Variables to compare",
  ncol = "Nb Columns",
  ncharts = "Nb Charts"
)

Arguments

settings

Title of the settings panel.

chart

Title of the chart panel.

compare

Label of the checkbox that activate the comparison mode.

compareVars

Label of the input containing the list of variables to compare.

ncol

Label of the input that sets the number of columns.

ncharts

Label of the input that sets the number of charts.

Value

Named list of translation strings.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
translations <- mwTranslations(
  settings = "Parametres", chart = "Graphique", compare = "Comparaison",
  compareVars = "Variable de comparaison", ncharts = "Nb graph.", ncol = "Nb col."
)

if (require(dygraphs)) {
  mydata <- data.frame(year = 2000+1:100, value = rnorm(100))
  manipulateWidget(dygraph(mydata[range[1]:range[2] - 2000, ], main = title),
                   range = mwSlider(2001, 2100, c(2001, 2100)),
                   title = mwText("Fictive time series"),
                   .translations = translations)
}

rte-antares-rpackage/manipulateWidget documentation built on Oct. 5, 2021, 8:20 p.m.