Title: | Translate Between Different Languages |
Version: | 0.0.1 |
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. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
Imports: | httr, rvest |
Depends: | R (≥ 2.10) |
LazyData: | true |
NeedsCompilation: | no |
Packaged: | 2023-04-24 22:58:02 UTC; mohamed |
Author: | Mohamed El-Desouky
|
Maintainer: | Mohamed El-Desouky <mohamed_d180@hotmail.com> |
Repository: | CRAN |
Date/Publication: | 2023-04-25 18:00:02 UTC |
List of language codes
Description
This is the list of supported codes for languages included in gtranslate.
Usage
lang_codes
Format
An object of class list
of length 133.
Author(s)
References
https://cloud.google.com/translate/docs/languages
Translate between different languages
Description
Translate between different languages
Usage
translate(text, from = "auto", to = "ar", trim_str = TRUE)
Arguments
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. |
Value
(character) vector of translated input text.
Examples
translate("How are you?", from = "auto", to = "ar")