R/trans_reload.R

Defines functions trans_reload

Documented in trans_reload

#' Force translation reload
#'
#' @description This function forces the translations to be loaded from JSON
#' files again.
#'
#' @examples
#' trans_path(system.file("examples", package = "translated"))
#' trans_reload()
#'
#' @return No return value, called for its side effect.
#'
#' @importFrom utils assignInMyNamespace
#' @export
trans_reload <- function() {
  assignInMyNamespace(".TRANS_DICT", load_translations())
  assignInMyNamespace(".CURRENT_DICT", NULL)
}

Try the translated package in your browser

Any scripts or data that you put into this service are public.

translated documentation built on April 25, 2023, 5:09 p.m.