Description Usage Arguments Value Examples
View source: R/saveTranslation.R
saveTranslation
saves the library-internal translation environment as an RDS file, for details see saveRDS
.
readTranslation
restores the library-internal translation environment from an RDS file, for details see readRDS
.
cleanTranslation
deletes in all domains and languages the translations in the library-internal translation environment.
1 2 3 4 5 6 7 8 9 10 11 | saveTranslation(
file,
ascii = FALSE,
version = 2,
compress = TRUE,
refhook = NULL
)
readTranslation(file, refhook = NULL, append = TRUE)
cleanTranslation()
|
file |
a connection or the name of the file where the R object is saved to or read from. |
ascii |
a logical. If |
version |
the workspace format version to use. |
compress |
a logical specifying whether saving to a named file is
to use |
refhook |
a hook function for handling reference objects. |
append |
logical: append to current translation environment (default: |
nothing
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # read a german PO file from the package directory into the internal translation object
fd <- bind(de=system.file("shiny", "app2", "myproject_de_DE.po", package="gettext"))
readPofile(fd)
# show a copy of the internal translation object
getTranslation()
# save the internal translation object to a file
file <- sprintf("%s/translation.RDS", tempdir(TRUE))
saveTranslation(file)
# deletes all entries in the internal translation object
cleanTranslation()
getTranslation() # should be empty
# loads an previously saved internal translation object from a file
readTranslation(file)
getTranslation()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.