mirror of
https://github.com/msberends/AMR.git
synced 2025-07-13 04:42:09 +02:00
(v1.7.1.9067) Support for Swedish and Russian
This commit is contained in:
@ -2,10 +2,10 @@
|
||||
% Please edit documentation in R/translate.R
|
||||
\name{translate}
|
||||
\alias{translate}
|
||||
\alias{get_locale}
|
||||
\alias{get_AMR_locale}
|
||||
\title{Translate Strings from AMR Package}
|
||||
\usage{
|
||||
get_locale()
|
||||
get_AMR_locale()
|
||||
}
|
||||
\description{
|
||||
For language-dependent output of AMR functions, like \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_gramstain]{mo_gramstain()}}, \code{\link[=mo_type]{mo_type()}} and \code{\link[=ab_name]{ab_name()}}.
|
||||
@ -13,7 +13,7 @@ For language-dependent output of AMR functions, like \code{\link[=mo_name]{mo_na
|
||||
\details{
|
||||
Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: \url{https://github.com/msberends/AMR/blob/main/data-raw/translations.tsv}. This file will be read by all functions where a translated output can be desired, like all \code{\link[=mo_property]{mo_*}} functions (such as \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_gramstain]{mo_gramstain()}}, \code{\link[=mo_type]{mo_type()}}, etc.) and \code{\link[=ab_property]{ab_*}} functions (such as \code{\link[=ab_name]{ab_name()}}, \code{\link[=ab_group]{ab_group()}}, etc.).
|
||||
|
||||
Currently supported languages are: Danish, Dutch, English, French, German, Italian, Portuguese and Spanish. All these languages have translations available for all antimicrobial agents and colloquial microorganism names.
|
||||
Currently supported languages are: Danish, Dutch, English, French, German, Italian, Portuguese, Russian, Spanish and Swedish. All these languages have translations available for all antimicrobial agents and colloquial microorganism names.
|
||||
|
||||
Please suggest your own translations \href{https://github.com/msberends/AMR/issues/new?title=Translations}{by creating a new issue on our repository}.
|
||||
\subsection{Changing the Default Language}{
|
||||
@ -24,7 +24,7 @@ The system language will be used at default (as returned by \code{Sys.getenv("LA
|
||||
\item Setting the system variable \code{LANGUAGE} or \code{LANG}, e.g. by adding \code{LANGUAGE="de_DE.utf8"} to your \code{.Renviron} file in your home directory
|
||||
}
|
||||
|
||||
So if the R option \code{AMR_locale} is set, the system variables \code{LANGUAGE} and \code{LANG} will be ignored.
|
||||
Thus, if the R option \code{AMR_locale} is set, the system variables \code{LANGUAGE} and \code{LANG} will be ignored.
|
||||
}
|
||||
}
|
||||
\section{Stable Lifecycle}{
|
||||
@ -43,15 +43,15 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
|
||||
\examples{
|
||||
# The 'language' argument of below functions
|
||||
# will be set automatically to your system language
|
||||
# with get_locale()
|
||||
# with get_AMR_locale()
|
||||
|
||||
# English
|
||||
mo_name("CoNS", language = "en")
|
||||
#> "Coagulase-negative Staphylococcus (CoNS)"
|
||||
|
||||
# Danish
|
||||
mo_name("CoNS", language = "nl")
|
||||
#> "Koagulase-negative stafylokokker (CoNS)"
|
||||
mo_name("CoNS", language = "da")
|
||||
#> "Koagulase-negative stafylokokker (KNS)"
|
||||
|
||||
# Dutch
|
||||
mo_name("CoNS", language = "nl")
|
||||
|
Reference in New Issue
Block a user