Translate long text using Google Translate
Source:R/google_translate_long_text.R
google_translate_long_text.Rd
This function translates long text from one language to another using Google Translate. It splits the text into smaller chunks if necessary to handle large inputs.
Usage
google_translate_long_text(
text,
target_language = "en",
source_language = "auto",
chunk_size = 1000
)
Arguments
- text
The long text to translate. Should be a single string.
- target_language
The language to translate the text into. Default is "en" for English.
- source_language
The language of the input text. Default is "auto" for automatic detection.
- chunk_size
The maximum number of characters to send in a single translation request. Default is 1000.