powered by
Translates the content of a file using Google Translate API.
translate_file( file_path, target_language = "en", source_language = "auto", overwrite = FALSE )
The path to the file to be translated.
The target language to translate the file content to. Default is "en".
The source language of the file content. Default is "auto".
Logical indicating whether to overwrite the original file with the translated content. Default is FALSE.
if (FALSE) { translate_file("path/to/file.txt", target_language = "fr", source_language = "en", overwrite = TRUE) }
Run the code above in your browser using DataLab