translate.Rd
For language-dependent output of AMR functions, like mo_fullname
and mo_type
.
get_locale()
Strings will be translated to foreign languages if they are defined in a local translation file. This file comes with this package and can be found when running:
system.file("translations.tsv", package = "AMR")
This file will be read by all functions where a translated output can be desired, like all mo_property
functions (mo_fullname
, mo_type
, etc.). Please suggest your own translations by creating a new issue on our repository.
The system language will be used at default, if supported, using get_locale
. The system language can be overwritten with getOption("AMR_locale")
.
On our website https://msberends.gitlab.io/AMR you can find a tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
# NOT RUN { # The 'language' parameter of below functions # will be set automatically to your system language # with get_locale() # English mo_fullname("CoNS", language = "en") #> "Coagulase-negative Staphylococcus (CoNS)" # German mo_fullname("CoNS", language = "de") #> "Koagulase-negative Staphylococcus (KNS)" # Dutch mo_fullname("CoNS", language = "nl") #> "Coagulase-negatieve Staphylococcus (CNS)" # Spanish mo_fullname("CoNS", language = "es") #> "Staphylococcus coagulasa negativo (SCN)" # Italian mo_fullname("CoNS", language = "it") #> "Staphylococcus negativo coagulasi (CoNS)" # Portuguese mo_fullname("CoNS", language = "pt") #> "Staphylococcus coagulase negativo (CoNS)" # }