gettextify: gettextify

Description Usage Arguments Value Examples

View source: R/gettextify.R

Description

Takes a file, R code or R expression and replaces all text constants by gettext(text_constant). The replacement is not done inside gettext, G, ngettext, N, library and require. If expr is a character then gettextify tries first to open a file with the name. If this fails then it wil be assumed that expr contains valid R code.

Usage

1
gettextify(expr, exclude = NULL)

Arguments

expr

character or expression

exclude

character: names of further function to exclude from replacement

Value

character vector with modified code

Examples

1
2
3
gettextify ('x<-"a"')
gettextify (system.file(package='gettext', 'shiny', 'app1', 'app.R'))
gettextify (parse(system.file(package='gettext', 'shiny', 'app1', 'app.R')))

sigbertklinke/gettext documentation built on Feb. 17, 2020, 10:37 a.m.