使用说明
本地化mcp服务器
MCP服务器 Localise.biz --直接从Claude、Cursor或任何MCP客户端管理翻译。
设置
npx localise-mcp-server
需要a LOCALISE_API_KEY 环境变量。从以下地址获取您的 本地化.biz API密钥.
克劳德桌面
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"localise-biz": {
"command": "npx",
"args": ["-y", "localise-mcp-server"],
"env": {
"LOCALISE_API_KEY": "your-api-key"
}
}
}
}
克劳德代码(CLI)
claude mcp add localise-biz -- npx -y localise-mcp-server
然后在您的环境中设置您的API密钥:
export LOCALISE_API_KEY="your-api-key"
光标
增添 .cursor/mcp.json 在您的项目中:
{
"mcpServers": {
"localise-biz": {
"command": "npx",
"args": ["-y", "localise-mcp-server"],
"env": {
"LOCALISE_API_KEY": "your-api-key"
}
}
}
}
工具
| 工具 | 说明 |
|---|---|
list_locales |
列出项目中的所有区域设置 |
list_assets |
列出翻译键,带可选过滤器 |
create_asset |
创建新的翻译密钥 |
translate |
添加或更新键+区域设置的翻译 |
get_translations |
获取跨地区密钥的所有翻译 |
export_locale |
导出区域设置(json、xml、csv、xliff、po) |
batch_translate |
创建密钥并一次添加多个翻译 |
例子
“列出我项目中的所有区域设置”
“创建密钥
buttons.submit翻译:英语“Submit”,法语“Soumettre”,德语“Einreichen”
“将所有法语翻译导出为JSON”
“翻译是什么
home.title在所有地区?"
许可证
麻省理工学院