Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/edit_translations.R
Edit a translation object in-memory using a simple interface
1 | edit_translation(translation, language, pkg = ".", domain = "R")
|
translation |
An object of class |
language |
A character string specifying a language, as either: (1) “ll”, an ISO 639 two-letter language code (lowercase), or (2) “ll_CC”, an ISO 639 two-letter language code (lowercase) and ‘CC’ is an ISO 3166 two-letter country code (uppercase). |
pkg |
The directory of an R package to extract diagnostic messages from. Path is passed to |
domain |
A character string specifying the “domain” of the messages. Either “R” (the default) or “C”. This is case insensitive. |
An object of class "po"
.
Emacs users may find the gettext PO file editor more comfortable: https://www.gnu.org/software/gettext/manual/gettext.html#PO-Mode.
Thomas J. Leeper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# setup pkg for localization
pkg <- dummy_pkg()
use_localization(pkg = pkg)
# generate translation in memory
(tran <- make_translation("es", translator = "Some Person <example@examle.com>", pkg = pkg))
# edit translations
tran2 <- edit_translation(tran, pkg = pkg)
# write to disk
write_translation(tran2, pkg = pkg)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.