Skip to main content
Glama
rog0x

@rog0x/mcp-i18n-tools

by rog0x

@rog0x/mcp-i18n-tools

面向 AI 代理的国际化和本地化工具,以 MCP(模型上下文协议)服务器形式提供。

工具

detect_locale

检测给定文本字符串的语言和区域设置。返回检测到的语言代码(BCP 47)、语言名称、书写系统、置信度分数(0-1)以及备选语言候选。

支持的语言: 英语、西班牙语、法语、德语、葡萄牙语、意大利语、俄语、日语、韩语、中文、阿拉伯语、印地语、泰语、希腊语、希伯来语。

extract_i18n_keys

从源代码中提取应进行国际化的硬编码用户可见字符串。可查找以下位置的字符串:

  • JSX/TSX 属性(titleplaceholderlabelaltaria-label 等)

  • HTML 模板文本和属性

  • console.log / console.warn / console.error 调用

  • throw new Error(...) 消息

  • alert() / confirm() / prompt() 对话框

  • 使用与 i18n 相关名称(messagelabeltitle 等)的变量赋值

返回每个字符串及其行/列位置、上下文、模式类型以及建议的 i18n 键。

analyze_translations

分析翻译 JSON 文件在各区域设置之间的一致性。可检测:

  • 缺失键 — 在参考区域设置中存在但在其他区域设置中缺失

  • 多余键 — 在某个区域设置中存在但不在参考区域设置中

  • 结构不匹配 — 某个键在一个区域设置中是字符串,但在另一个区域设置中是对象

  • 插值不匹配{variable} 占位符在不同区域设置之间不一致

  • 空值 — 翻译为空的键

  • 未使用的键 — 源代码中未引用的键(需要提供已使用键的列表)

plural_rules

按照 CLDR 规则为给定区域设置生成复数形式类别。显示该语言使用的复数类别,并对您提供的任何测试数字进行分类。

语言

类别

英语

one, other

法语

one, other

俄语

one, few, many, other

阿拉伯语

zero, one, two, few, many, other

波兰语

one, few, many, other

日语

other

中文

other

format_locale

使用 Intl API 为任何区域设置格式化数字、货币、日期和相对时间。支持:

  • 数字 — 小数、百分比、单位;紧凑/科学/工程计数法

  • 货币 — 符号、窄符号、代码和名称显示

  • 日期 — 短、中、长、完整样式,含日期部分分解

  • 相对时间 — 长、短、窄样式,支持自动数字格式化

Related MCP server: todoist

设置

npm install
npm run build

MCP 配置

{
  "mcpServers": {
    "i18n-tools": {
      "command": "node",
      "args": ["D:/products/mcp-servers/mcp-i18n-tools/dist/index.js"]
    }
  }
}

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • Model Context Protocol extension for Hebrew calendar

  • A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rog0x/mcp-i18n-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server