trans_locale {translated}R Documentation

Access translation locale

Description

This function allows setting translation locale and accessing the currently set one.

Usage

trans_locale(locale)

Arguments

locale

character(1)
Locale to set, must be of form "lang_country.encoding" (or simplified ones, i.e. "lang_country" and "lang"). lang and country must be two-letter codes, preferably in agreement with the latest ISO norm.

Value

If locale was not passed, currently set locale, else nothing.

Examples

trans_path(system.file("examples", package = "translated"))

# Check your default locale
trans_locale()

# Switch the translation to Polish language
trans_locale("pl_PL")
trans("title")


[Package translated version 0.1.1 Index]