This is a simple Java application that uses Swing for its GUI and allows users to translate text between different languages using DeepL, Google Translate, and OpenAI GPT-3.5 APIs.
- User-friendly Swing-based GUI
- Select from different translation engines: DeepL, Google Translate, and OpenAI GPT-3.5
- Choose source and target languages for translation
- Enter the text to be translated in a textarea
- Display the translated text in another textarea
- Copy the translated text to the clipboard
- Java JDK 11 or later
- Maven
- Clone this repository to your local machine.
- Obtain API keys for the DeepL, Google Translate, and OpenAI GPT-3.5 services, and download the Google Cloud credentials JSON file for your Google Cloud project.
- Create an
env.properties
file in the project root directory with the following content, replacing the placeholders with the appropriate values:
DEEPL_API_KEY=your_deepl_api_key
GOOGLE_API_KEY=your_google_api_key
OPENAI_API_KEY=your_openai_api_key
GOOGLE_APPLICATION_CREDENTIALS=path_to_your_credentials_file.json
GOOGLE_PROJECT_ID=your_project_id
- Build the application using Maven:
mvn clean compile
- Run the application:
mvn exec:java -Dexec.mainClass="Main"
- Launch the application by following the setup steps above.
- Select the translation engine you want to use from the dropdown menu.
- Choose the source and target languages from the language selectors.
- Enter the text you want to translate in the textarea on the left.
- Click the "Translate" button to perform the translation.
- The translated text will be displayed in the textarea on the right.
- Click the "Copy" button to copy the translated text to the clipboard.
This project is open-source and available under the MIT License.