Create a list with all the text elements of the selectivity sheet in the selected language

create_translate_dict(
  path = system.file("template", "translation.csv", package = "inser"),
  language = c("EN", "FR"),
  encoding = "UTF-8",
  sep = ";"
)

Arguments

path

character. The path to the csv translation file

language

character. The chosen language for the text, must be "FR" or "EN" (default)

encoding

character. The encoding of the csv file, default to "UTF-8"

sep

character. The field separator used in the CSV file

Value

list. A list of translated text, with names referring to their location in the sheet

Examples

# create the EN translator
lg <- create_translate_dict(language = "EN")
#> Using the EN version of the selectivity template

# call main title by its ID
cat(lg[["0_main_title"]])
#> Selectivity sheet - InseR

# create the FR translator
lg <- create_translate_dict(language = "FR")
#> Using the FR version of the selectivity template

# call main title by its ID
cat(lg[["0_main_title"]])
#> Fiche de sélectivité - InseR