R/translate.R

Defines functions translateToBraille

Documented in translateToBraille

#' @useDynLib yaleBraille, .registration=TRUE
NULL
#'
#' Translate text to Braille
#'
#' @param text A character string to translate.
#' @param table The Braille table to use (e.g., "en-ueb-g2.ctb").
#' @return A character string of translated Braille.
#' @export
translateToBraille <- function(text, table) {
  # Resolves to correct path on ANY machine at runtime
  tables_dir <- system.file("tables", package = "yaleBraille")
  full_table_path <- file.path(tables_dir, table)
  .Call("r_translate", text, full_table_path)
}

Try the yaleBraille package in your browser

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

yaleBraille documentation built on Oct. 2, 2026, 5:08 p.m.