Title: | Translate Between Different Languages |
---|---|
Description: | The goal of this package is to translate between different languages without any Google API authentication which is pain and you must pay for the key, This package is free and lightweight. |
Authors: | Mohamed El-Desouky [aut, cre] |
Maintainer: | Mohamed El-Desouky <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2024-10-31 16:33:33 UTC |
Source: | https://github.com/mohamed-180/gtranslate |
This is the list of supported codes for languages included in gtranslate.
lang_codes
lang_codes
An object of class list
of length 133.
https://cloud.google.com/translate/docs/languages
Translate between different languages
translate(text, from = "auto", to = "ar", trim_str = TRUE)
translate(text, from = "auto", to = "ar", trim_str = TRUE)
text |
(character) vector of text to translate |
from |
(character) abbreviation to the input language code eg: "en" for English, by default it is "auto" for auto-detecting the input language. |
to |
(character) abbreviation to the output language code. |
trim_str |
(logical) indicating whether to trim the string if it is exceeds 5000 characters. |
(character) vector of translated input text.
translate("How are you?", from = "auto", to = "ar")
translate("How are you?", from = "auto", to = "ar")