Skip to contents

Translate function

Usage

gtl_translate_enfr(english, french)

Arguments

english

English string

french

French string

A function that returns the english or french argument depending on the current language setting.

Value

String depending on package language option

Examples

gtl_opt_set_i18n("fr_CH") # Set language to french
gtl_translate_enfr("Hello world!", "Bonjour le monde !")
#> [1] "Bonjour le monde !"

gtl_opt_set_i18n("en_US") # Set language to english
gtl_translate_enfr("Hello world!", "Bonjour le monde !")
#> [1] "Hello world!"