This R script serves as a Google Translate API wrapper, utilizing the httr
library to facilitate text translation between languages. The script prompts users to enter the text, source language, and target language interactively.
-
R installed on your machine.
-
Install the required R packages:
install.packages("httr")
-
Clone the Repository:
git clone https://github.com/real0x0a1/R-Translator.git
-
Navigate to the Project Directory:
cd R-Translator
-
Run the Script:
-
Open R or RStudio.
-
Load and run the script:
source("translate_script.R")
-
-
Follow the Prompts:
- Enter the text you want to translate when prompted.
- Enter the source language code (e.g.,
en
) when prompted. - Enter the target language code (e.g.,
es
) when prompted.
-
View the Result:
- The translated text will be displayed on the console.
- Ensure that you have an active internet connection to access the Google Translate API.
- Ali (Real0x0a1)