1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 20:41:58 +02:00

new function get_locale

This commit is contained in:
2018-11-05 13:20:32 +01:00
parent e548a7ad11
commit d07e9b904e
10 changed files with 184 additions and 55 deletions

19
man/get_locale.Rd Normal file
View File

@ -0,0 +1,19 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_locale.R
\name{get_locale}
\alias{get_locale}
\title{Get language for AMR}
\usage{
get_locale()
}
\description{
Determines the system language to be used for language-dependent output of AMR functions, like \code{\link{mo_gramstain}} and \code{\link{mo_type}}.
}
\details{
The system language can be overwritten with \code{\link{getOption}("AMR_locale")}.
}
\section{Supported languages}{
Supported languages are \code{"en"} (English), \code{"de"} (German), \code{"nl"} (Dutch), \code{"es"} (Spanish), \code{"it"} (Italian), \code{"fr"} (French), and \code{"pt"} (Portuguese).
}

View File

@ -19,15 +19,15 @@
\alias{mo_taxonomy}
\title{Property of a microorganism}
\usage{
mo_fullname(x, language = NULL, ...)
mo_fullname(x, language = get_locale(), ...)
mo_shortname(x, language = NULL, ...)
mo_shortname(x, language = get_locale(), ...)
mo_subspecies(x, language = NULL, ...)
mo_subspecies(x, language = get_locale(), ...)
mo_species(x, language = NULL, ...)
mo_species(x, language = get_locale(), ...)
mo_genus(x, language = NULL, ...)
mo_genus(x, language = get_locale(), ...)
mo_family(x, ...)
@ -41,20 +41,20 @@ mo_subkingdom(x, ...)
mo_ref(x, ...)
mo_type(x, language = NULL, ...)
mo_type(x, language = get_locale(), ...)
mo_TSN(x, ...)
mo_gramstain(x, language = NULL, ...)
mo_gramstain(x, language = get_locale(), ...)
mo_property(x, property = "fullname", language = NULL, ...)
mo_property(x, property = "fullname", language = get_locale(), ...)
mo_taxonomy(x, ...)
}
\arguments{
\item{x}{any (vector of) text that can be coerced to a valid microorganism code with \code{\link{as.mo}}}
\item{language}{language of the returned text, defaults to English (\code{"en"}) and can also be set with \code{\link{getOption}("AMR_locale")}. Either one of \code{"en"} (English), \code{"de"} (German), \code{"nl"} (Dutch), \code{"es"} (Spanish) or \code{"pt"} (Portuguese).}
\item{language}{language of the returned text, defaults to system language (see \code{\link{get_locale}}) and can also be set with \code{\link{getOption}("AMR_locale")}.}
\item{...}{other parameters passed on to \code{\link{as.mo}}}
@ -66,6 +66,11 @@ A \code{list} (in case of \code{mo_taxonomy}) or a \code{character} otherwise
\description{
Use these functions to return a specific property of a microorganism from the \code{\link{microorganisms}} data set. All input values will be evaluated internally with \code{\link{as.mo}}.
}
\section{Supported languages}{
Supported languages are \code{"en"} (English), \code{"de"} (German), \code{"nl"} (Dutch), \code{"es"} (Spanish), \code{"it"} (Italian), \code{"fr"} (French), and \code{"pt"} (Portuguese).
}
\section{ITIS}{
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}