automatic translator
AutoTranslator v2.0 is a comprehensive SMAPI module designed specifically for Stardew Valley that can automatically translate mods, game assets, and Content Patcher content using multiple AI providers. Supports OpenAI, DeepSeek, Anthropic Claude and Google Gemini API, providing flexible and cost-effective translation options.
About this mod Machine translation
AutoTranslator v2.0 is a comprehensive SMAPI module designed specifically for Stardew Valley that can automatically translate mods, game assets, and Content Patcher content using multiple AI providers. Supports OpenAI, DeepSeek, Anthropic Claude and Google Gemini API, providing flexible and cost-effective translation options.
AutoTranslator
✨ Core Functions
**🎯 i18n specialization**
- **Only translate i18n files** - Removed unstable dynamic resource functionality
- **Automatic source language detection** - does not assume all content is in English
- **Support default/structure** - Translate complete `i18n/default/` folder
- **Token Preserved** - Keep variables like `$query`, `{{player}}`, `{0}` from being translated
**🤖 Multiple AI provider support**
- **OpenAI** - GPT-4o-mini (recommended)
- **DeepSeek** - deepseek-chat model
- **Anthropic** - Claude 3.5 Sonnet
- **Google** - Gemini 1.5 Pro
**⚡ Intelligent update system**
- **Smart Update** - Only translated files or new keys
- **Change Detection** - Automatic comparison of modification dates
- **Partial translation** - only add missing key values
- **Case Sensitive Comparison** - Prevent duplicate key values
**🛡️ Stability and Robustness**
- **Powerful Error Handling** - Detailed logging and automatic recovery
- **Key Value Validation** - Prevent dictionary errors
- **Safe JSON Loading** - Consistent handling of corrupted files
- **AUTO-RETRY** - Backup system for API errors
📁 Supported formats
**TRADITIONAL FORMAT**
```
YourMod/
├── i18n/
│ ├── default.json (or en.json)
│ └── es.json (automatically generated)
```
**New default/format**
```
YourMod/
├── i18n/
│ ├── default/
│ │ ├── items.json
│ │ ├── quests.json
│ │ └── dialogue.json
│ └── es/ (automatically generated)
│ ├── items.json
│ ├── quests.json
│ └── dialogue.json
```
⚙️ Quick settings
**Minimum Configuration (OpenAI)**
```json
{
"AIProvider": "openai",
"OpenAIApiKey": "your-api-key-here",
"OpenAIModel": "gpt-4o-mini",
"UseGeneralLocale": true,
"EnableSmartUpdates": true,
"VerboseI18nLogging": false
}
```
**DeepSeek configuration (affordable)**
```json
{
"AIProvider": "deepseek",
"DeepSeekApiKey": "your-api-key-here",
"DeepSeekModel": "deepseek-chat",
"CallDelayMs": 500
}
```
**Anthropic Configuration (High Quality)**
```json
{
"AIProvider": "anthropic",
"AnthropicApiKey": "your-api-key-here",
"AnthropicModel": "claude-3-5-sonnet-20240620",
"CallDelayMs": 1000
}
```
**Google Gemini Configuration (Multi-Function)**
```json
{
"AIProvider": "google",
"GoogleApiKey": "your-api-key-here",
"GoogleModel": "gemini-1.5-pro",
"CallDelayMs": 600
}
```
🎮 How to use
- Install the module into the `Mods/` folder
- Configure AI provider and API key in `config.json`
- Start Stardew Valley and load the save file
- The module will automatically detect and translate the i18n files of all modules
- Translation results are saved as physical files (no caching)
📋 System Requirements
- **Stardew Valley 1.5.6+**
- **API key** from at least one supporting provider
💡 PRO TIP
- **OpenAI GPT-4o-mini** provides the best price/performance ratio
- **DeepSeek** Extremely cost-effective for high-volume translations
- **Enable `EnableSmartUpdates`** to achieve automatic module updates
- **Use `VerboseI18nLogging: true`** for debugging
- **Configure `CallDelayMs` according to API restrictions**
🔗 Related links
- OpenAI API key
- DeepSeek API key
- Anthropic Claude API
- Google Gemini API key
---
**Note:** This mod requires access to the translation service's API. The cost of use depends on the provider you choose and the volume of translations. Please always monitor API usage and set spending limits on the provider dashboard.
Install & use Install: SMAPI mod (Stardew Valley standard)
- Install SMAPI first (Stardew Valley's mod loader): download it from smapi.io, run 'install on Windows.bat' and pick your game folder.
- Unzip the archive from playbuff and find the folder that contains manifest.json — that folder is the mod.
- Copy that whole folder into Stardew Valley/Mods/.
- Launch the game through SMAPI (run StardewModdingAPI.exe or set it as the launch option). The console before the title screen lists each mod's load result.
Cheat-style tools may not need SMAPI — unzip and run them as the readme describes. Back up your save before editing it; SMAPI lists failed mods in its console.