Translation Services Configuration
i18n-mage.translationServices.autoTranslateMissingKey
- Type:
boolean - Default:
false
When fixing undefined keys, treat raw text as source text, generate a new key, write it to language files, and replace source code.
i18n-mage.translationServices.matchExistingKey
- Type:
boolean - Default:
true
Try matching undefined text to existing keys in reference language files before translating.
i18n-mage.translationServices.validateLanguageBeforeTranslate
- Type:
boolean - Default:
true
Validate whether source text looks like the reference language before translation.
i18n-mage.translationServices.unmatchedLanguageAction
- Type:
string - Default:
query
Action when language validation fails:
ignoreforcefillswitchquery
i18n-mage.translationServices.keyGenerationFillScope
- Type:
enum - Default:
all
Language fill scope for newly generated keys:
minimalall
i18n-mage.translationServices.ignorePossibleVariables
- Type:
boolean - Default:
true
Ignore possible variables when extracting undefined entries.
i18n-mage.translationServices.autoTranslateEmptyKey
- Type:
boolean - Default:
true
Whether to translate empty values during fix operations.
i18n-mage.translationServices.referenceLanguage
- Type:
string - Default: VS Code default language
Reference language used by translation services.
i18n-mage.translationServices.langAliasCustomMappings
- Type:
object - Default:
{}
Custom language alias mappings.
i18n-mage.translationServices.translateApiPriority
- Type:
array - Default:
[ "deepl", "chatgpt", "deepseek", "baidu", "tencent", "youdao", "google" ]
Translation provider priority order. If one provider fails, the plugin will automatically switch to the next available provider.
i18n-mage.translationServices.customProviders
- Type:
array - Default:
[]
Custom OpenAI-compatible AI service configuration list. After configuration, enable the service using custom:<id> in translateApiPriority.
Each configuration contains:
id: Service identifier (letters, numbers,-,_,.only), will be converted tocustom:<id>baseUrl: Chat Completions API address (e.g.,https://xxx/v1/chat/completions)apiKey: Service API Keymodel: Default model name (required if enabled intranslateApiPriority)enabled: Whether to enable (optional, defaulttrue)useProxy: Whether to use plugin proxy config (optional, defaulttrue)translateBatchConfig: Translation batch config (optional)generateBatchConfig: Key generation batch config (optional)
Example:
{
"i18n-mage.translationServices.customProviders": [
{
"id": "acme",
"baseUrl": "https://api.acme.com/v1/chat/completions",
"apiKey": "YOUR_API_KEY",
"model": "acme-chat",
"enabled": true,
"useProxy": true,
"translateBatchConfig": {
"maxLen": 4000,
"batchSize": 20,
"interval": 800
},
"generateBatchConfig": {
"maxLen": 2000,
"batchSize": 10,
"interval": 1100
}
}
],
"i18n-mage.translationServices.translateApiPriority": [
"custom:acme",
"chatgpt",
"google"
]
}Note:
- Duplicate
idvalues will only keep the first configuration - Configurations with
enabled: falsewill be ignored - Non-existent
custom:*intranslateApiPrioritywill be automatically ignored
i18n-mage.translationServices.aiCustomPrompt
- Type:
string - Default:
""
Custom prompt appended to AI translation context. Can be used to constrain tone, professional terminology, brand names, and style consistency. Write as concise rules, e.g., "Keep variable placeholders, don't translate brand names, use a product copy tone".
i18n-mage.translationServices.deeplVersion
- Type:
string - Default:
free
DeepL API version (free or pro).
API Keys
Global providers:
i18n-mage.translationServices.deeplApiKeyi18n-mage.translationServices.googleApiKeyi18n-mage.translationServices.openaiApiKeyi18n-mage.translationServices.openaiModeli18n-mage.translationServices.deepseekApiKeyi18n-mage.translationServices.deepseekModeli18n-mage.translationServices.doubaoApiKeyi18n-mage.translationServices.doubaoModeli18n-mage.translationServices.qwenApiKeyi18n-mage.translationServices.qwenModeli18n-mage.translationServices.hunyuanApiKeyi18n-mage.translationServices.hunyuanModeli18n-mage.translationServices.kimiApiKeyi18n-mage.translationServices.kimiModel
Optional regional providers:
i18n-mage.translationServices.baiduAppIdi18n-mage.translationServices.baiduSecretKeyi18n-mage.translationServices.tencentSecretIdi18n-mage.translationServices.tencentSecretKeyi18n-mage.translationServices.youdaoAppIdi18n-mage.translationServices.youdaoAppKey
Proxy
Use proxy settings only when your company or environment requires outbound proxy routing.
i18n-mage.translationServices.proxy.enable
- Type:
boolean - Default:
false
i18n-mage.translationServices.proxy.host
- Type:
string - Default:
127.0.0.1
i18n-mage.translationServices.proxy.port
- Type:
number - Default:
7890
i18n-mage.translationServices.proxy.protocol
- Type:
enum - Default:
http - Options:
http,https
