Skip to content

Get last error msg in a different lang #2

@richierocks

Description

@richierocks

Something like

le <- function(lang_to = Sys.getenv("LANG"), api_key, engine = c("microsoft", "google")) {
  msg <- geterrmessage()
  if(msg == "") {
    message("There is no error to translate.")
    return("")
  }
  engine <- match.arg(engine)
  get_translations(msg, lang_to, api_key, engine = engine)
}

Need to convert LANG env var to ISO lang format. Need to deal with both engines better. e.g., auto supply API key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions