install: Install translations

Description Usage Arguments Details Value Note See Also Examples

Description

Check and install message translations

Usage

1
2
3
4
5
6
7
check_translation(language, pkg = ".", domain = "R", strictPlural = FALSE,
  verbose = getOption("verbose"))

check_translations(pkg = ".", strictPlural = FALSE,
  verbose = getOption("verbose"))

install_translations(pkg = ".", verbose = getOption("verbose"))

Arguments

language

A character string specifying a language.

pkg

The directory of an R package to extract diagnostic messages from. Path is passed to as.package.

domain

A character string specifying the “domain” of the messages. Either “R” (the default) or “C”. This is case insensitive.

strictPlural

A logical indicating whether to compare formats of singular and plural forms in a strict way. See checkPoFile.

verbose

A logical. Should the function be chatty?

Details

check_translation checks a specific translation file. check_translations checks all translations in the /po directory. These are just wrappers around checkPoFile.

install_translations performs a reduced set of the functionality described in update_pkg_po.

Value

check_translation returns an object of class “check_po_files”; check_translations returns a list of such objects. install_translations returns a logical TRUE, if successful.

Note

These functions require that gettext is installed on your system.

See Also

use_localization, make_translation

Examples

1
2
3
4
5
6
7
8
## Not run: 
  # check translations
  check_translations()
  
  # install translations
  install_translations()

## End(Not run)

msgtools documentation built on May 30, 2017, 5:12 a.m.