i18n: Create translator object

View source: R/i18n.R

i18nR Documentation

Create translator object

Description

Create a new translator object

Usage

i18n(resources, ..., options = NULL)

Arguments

resources

Path to a json file containing translation resources. If given in this way, then on-demand translation loading (via resource_pattern) is disabled unless a currently unexposed i18next option is used.

...

Named options passed to traduire_options

options

Options object passed to traduire_options

Warning

Note that the argument list here will change. The only part of this that we consider stable is that the first argument will represent a resource bundle.

Examples

path <- system.file("examples/simple.json", package = "traduire")
obj <- traduire::i18n(path)
obj$t("hello", language = "fr")

reside-ic/traduire documentation built on March 25, 2023, 8:21 a.m.