Home

Awesome

libretranslateR

<!-- badges: start -->

CodeFactor Project Status: Active - The project has reached a stable, usable state and is being actively developed. Github last-commit Github license

<!-- badges: end -->

Connect to LibreTranslate API from R

API Docs | LibreTranslate GitHub Repository | Official instance | List of instances

Features

Installation

This package is not yet available on CRAN. So you must install from GitHub using remotes package.

if (!require("remotes")) install.packages("remotes")
remotes::install_github("myanesp/libretranslateR")
# And then load into your current session
library(libretranslateR)

Examples and usage

set_config() # Config wizard for setting the instance you're going to use and your API key

translate(q = "hola, amigos", to = "en") # Autodetect language

translate(q = "hola", from = "es", to = "fr")

get_languages() # Display available languages

detect_language("do you know what i'm talking about?") # Detect language and the level of confidence

Install your own instance

You can follow the official instructions located at LibreTranslate's repository to host your own instance. You can do it through the Python's package or through a docker container.

Planned features