A native macOS translation app powered by the OpenAI API, with a clean, simple interface.
- ✨ Simple and modern user interface
- 🌍 Supports translation between 13 commonly used languages
- 🔄 Quick language switching
- 📋 Copy translations with one click
- ⚡️ High-quality translation based on OpenAI GPT-3.5 Turbo
- 💾 Automatically save your API key settings
- Chinese (Simplified)
- English
- Japanese
- Korean
- French
- German
- Spanish
- Italian
- Portuguese
- Russian
- Arabic
- Thai
- Vietnamese
Create an account on the OpenAI Platform and generate an API key.
Use Xcode to open the ChatGPTTranslator/ChatGPTTranslator.xcodeproj file.
Select the target device as "My Mac" in Xcode and click the Run button (⌘R).
When running for the first time, click the gear icon in the upper right corner and enter your OpenAI API Key.
- Select source and target languages
- Enter the text to be translated in the left input box
- Click the "Translate" button
- The translation results will be displayed on the right
- Click the "Copy" button to copy the translation results
- macOS 13.0 or higher
- Xcode 14.0 or higher (for building)
ChatGPTTranslator/
├── ChatGPTTranslator/
│ ├── ChatGPTTranslatorApp.swift # Application entry point
│ ├── ContentView.swift # Main interface
│ ├── Models/
│ │ ├── TranslationService.swift # Translation service (API call)
│ │ └── Language.swift # Language model
│ ├── Assets.xcassets/ # Resource file
│ ├── Info.plist # Application configuration
│ └── ChatGPTTranslator.entitlements # Permission configuration
└── ChatGPTTranslator.xcodeproj # Xcode project file
Handles communication with the OpenAI API and is responsible for:
- Send translation request
- Handling API responses
- Error handling and status management
The main interface includes:
- Two-column translation interface (source text | translation result)
- Language selection drop-down menu
- Translation button and operation button
- Status bar displays error or progress information
Configuration interface, used to set and save OpenAI API Key.
- OpenAI API usage is billed separately; monitor your usage.
- The API key is stored locally in UserDefaults. Keep it secure.
- An internet connection is required to use the translation function
- Translation quality depends on OpenAI’s GPT-3.5 model
- Add translation history
- Support switching between translation engines
- Add shortcut key support
- Support batch translation
- Add text-to-speech support
- Support translation of drag-and-drop files
MIT License
Issues and pull requests are welcome!