by vlinr
Provides automated translation of localization files (.ts, .js, .json) using large language models, extracting the target language from the filename and supporting both single‑file and directory batch processing.
Translate Server automates the localization workflow by reading .ts, .js, and .json files, detecting the language code embedded in the filename (e.g., messages.en-US.ts), and sending the text content to a large language model for translation. The tool preserves the original file structure and creates backups before modifying files.
npx -y translate-server
(or install locally via npm/yarn).original.backup.<timestamp>.<ext>
is kept.xx-XX
or xx-xx
).Q: Which language models are supported?
A: Any model reachable through the provided baseUrl
that accepts text translation prompts. The API key, model name, and base URL are supplied in the MCP configuration.
Q: Do I need to rename my files to match the naming convention?
A: Yes. The tool only processes files whose names contain a valid language code (e.g., en-US
, zh-CN
). Files that do not match are skipped.
Q: What happens to the original files?
A: Before any modification a backup is created with the pattern original.backup.<timestamp>.<ext>
. You can restore from these backups if needed.
Q: Can I limit concurrency or chunk size? A: Advanced options are configurable in the source code or via environment variables; defaults are reasonable for most scenarios.
Q: Is there support for other file formats? A: Currently only .ts, .js, and .json are supported. Extending to additional formats would require custom parsing logic.
这是一个基于大语言模型的本地化翻译工具,可以自动处理并翻译各种本地化文件(.ts、.js、.json)中的文本内容。
支持多种文件格式
智能文件处理
高效批处理
安全特性
翻译文件需要在文件名中包含语言代码,例如:
支持的语言代码格式:
{
"mcpServers": {
"transform": {
"command": "node",
"args": [
"{\"apiKey\":\"你的API密钥\",\"modelName\":\"你使用的模型名称\",\"baseUrl\":\"API基础URL\"}"
]
}
}
}
{
"mcpServers": {
"transform": {
"command": "cmd",
"args": [
"/c",
"node",
"{\"apiKey\":\"你的API密钥\",\"modelName\":\"你使用的模型名称\",\"baseUrl\":\"API基础URL\"}"
]
}
}
}
文件处理
原文件名.backup.时间戳.扩展名
错误处理
性能优化
路径问题
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "translate-server": { "command": "npx", "args": [ "-y", "translate-server" ], "env": { "API_KEY": "<YOUR_API_KEY>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by DeepLcom
Provides translation and rephrasing capabilities powered by the DeepL API via a Model Context Protocol server.
by intento
Provides translation capabilities via the Intento API through an MCP server, exposing a translate tool and a language‑codes resource for agents.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
A Model Context Protocol server that provides web content fetching capabilities.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.