powered by
Translator class
Translator object (for all possible methods look at Methods section)
languages
character vector with all languages
options
list with options from configuration file
translations
data.frame with translations
translation_language
character current translation language
mode
determines whether data was read from "csv" or "json" files.
parse_date(date)
Parse date to format described in 'cultural_date_format' field in config.
parse_number(number)
Parse numbers (to be implemented).
set_translation_language(transl_language)
Specify language of translation. It must exist in 'languages' field.
t(keyword)
Wrapper method. Look at 'translate'
translate(keyword)
Translates 'keyword' to language specified by 'set_translation_language'
# NOT RUN { i18n <- Translator(translation_json_path = "translation.json") # translation file i18n$set_translation_language("it") i18n$t("This text will be translated to italian") # }
Run the code above in your browser using DataLab