A Visual Studio Code extension that allows quick and accurate translation of selected text using OpenAI's GPT models. Supports translation into multiple languages, including English, Korean, Japanese, Chinese, Spanish, French, and German.
🚀 Features
One-click Translation: Instantly translate selected text to your desired language via the right-click context menu.
Accurate GPT-based Translations: Provides natural and precise translations leveraging GPT models.
Selectable GPT Models: Choose your preferred OpenAI GPT model (gpt-4o, gpt-4o-mini, or gpt-3.5-turbo) for translation.
🛠 Installation
Open the Extensions view in VSCode and search for GPT Translate, then install.
Alternatively, install via command-line:
code --install-extension SangDo.gpt-translate
🔑 OpenAI API Key Configuration
An OpenAI API key is required to use this extension:
Open VSCode settings.
Search for gptTranslate.openaiApiKey.
Enter your OpenAI API key.
"gptTranslate.openaiApiKey": "YOUR_API_KEY_HERE"
📌 Usage
Select the text you wish to translate.
Right-click and select from context menu:
Translate to English: Translates the selected text directly to English.
Translate to ...: Translates the selected text to a language of your choice.
⚙️ Configuration Options
Setting
Default
Description
gptTranslate.openaiApiKey
""
Your OpenAI API key.
gptTranslate.model
gpt-4o-mini
Choose OpenAI GPT model (gpt-4o, gpt-4o-mini, or gpt-3.5-turbo).
💡 Supported Languages
English
Korean
Japanese
Chinese
Spanish
French
German
⚠️ Important Notes
Using this extension involves OpenAI API calls, which may incur usage fees.