| lang_help | R Documentation |
Translates a given topic into a target language. It uses the lang argument
to determine which language to translate to. If not passed, this function will
look for a target language in the LANG and LANGUAGE environment variables, or
if something has been passed to the .lang argument in lang_use(), to
determine the target language. If the target language is English, no translation
will be processed, so the help returned will be the original package's
documentation.
lang_help(
topic,
package = NULL,
lang = NULL,
context_size = NULL,
type = getOption("help_type")
)
topic |
A character string specifying the help topic to translate. |
package |
The R package to look for the topic, if not provided the function will attempt to find the topic based on the loaded packages. |
lang |
A character vector language to translate the topic to |
context_size |
Maximum number of words for the context summary included
with each translation request. Set to |
type |
Produce "html" or "text" output for the help. It defaults to
|
Original or translated version of the help documentation in the output type specified
## Not run:
# Requires an interactive session with Ollama running locally
library(lang)
lang_use("ollama", "llama3.2", seed = 100)
lang_help("lang_help", lang = "spanish", type = "text")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.