I18n

io.github.rog0x由 GitHub 帳號 rog0x 發布v1.0.2更新於 Oct 24, 2026

Locale detect, translations, plurals for AI agents

已驗證STDIO僅桌面檔案與儲存開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,為助理提供國際化工具:語言地區偵測、i18n 鍵擷取、翻譯檔檢查、複數規則與地區格式化。

可以做什麼
提供五個在地化相關工具。detect_locale 辨識文字字串的語言與地區,回傳 BCP 47 代碼、書寫文字、信心分數與候選語言。extract_i18n_keys 在原始碼中找出硬編碼的面向使用者字串,例如 JSX 屬性、HTML 文字、console 呼叫、拋出的錯誤、對話框,以及帶有 i18n 相關名稱的變數,並給出行列位置與建議的鍵名。analyze_translations 比較各語系的翻譯 JSON 檔,檢查缺少、多餘、未使用或空白的鍵,以及結構與插值不符。plural_rules 回傳 CLDR 複數類別,format_locale 格式化數字、貨幣、日期與相對時間。
適用情境
適合助理協助在地化工作的情境:稽核程式碼庫中的硬編碼字串、檢查各語系翻譯檔之間的差異,或產生正確的複數形式以及符合地區習慣的數字、貨幣與日期格式。
執行需求
以 Node.js 程序透過 stdio 在本機執行,從 npm 套件 @rog0x/mcp-i18n-tools 安裝;README 說明了建置方式,並讓用戶端指向建置後的 dist/index.js 檔案。未宣告驗證、環境變數或標頭。僅支援桌面端,沒有網頁可執行版本。
安裝前請注意
這些工具會讀取提供給它們的原始碼與翻譯檔,因此只應指向你願意處理的程式碼與語系檔案。它只回報結果與建議,本身似乎不會寫入、傳送或刪除資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 I18n,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@rog0x/mcp-i18n-tools

Internationalization and localization tools for AI agents, exposed as an MCP (Model Context Protocol) server.

Tools

detect_locale

Detect the language and locale of a given text string. Returns the detected language code (BCP 47), language name, writing script, confidence score (0-1), and alternate language candidates.

Supported languages: English, Spanish, French, German, Portuguese, Italian, Russian, Japanese, Korean, Chinese, Arabic, Hindi, Thai, Greek, Hebrew.

extract_i18n_keys

Extract hardcoded user-facing strings from source code that should be internationalized. Finds strings in:

  • JSX/TSX attributes (title, placeholder, label, alt, aria-label, etc.)
  • HTML template text and attributes
  • console.log / console.warn / console.error calls
  • throw new Error(...) messages
  • alert() / confirm() / prompt() dialogs
  • Variable assignments with i18n-relevant names (message, label, title, etc.)

Returns each string with its line/column, surrounding context, pattern type, and a suggested i18n key.

analyze_translations

Analyze translation JSON files for consistency across locales. Detects:

  • Missing keys — present in reference locale but absent in others
  • Extra keys — present in a locale but not in the reference
  • Structure mismatches — a key is a string in one locale but an object in another
  • Interpolation mismatches — {variable} placeholders differ between locales
  • Empty values — keys with blank translations
  • Unused keys — keys not referenced in source code (requires a list of used keys)

plural_rules

Generate plural form categories for a given locale following CLDR rules. Shows which plural categories the language uses and classifies any test numbers you provide.

LanguageCategories
Englishone, other
Frenchone, other
Russianone, few, many, other
Arabiczero, one, two, few, many, other
Polishone, few, many, other
Japaneseother
Chineseother

format_locale

Format numbers, currencies, dates, and relative times for any locale using the Intl APIs. Supports:

  • Numbers — decimal, percent, unit; compact/scientific/engineering notation
  • Currency — symbol, narrowSymbol, code, and name displays
  • Dates — short, medium, long, full styles with date parts breakdown
  • Relative time — long, short, narrow styles with auto-numeric formatting

Setup

bash
npm installnpm run build

MCP Configuration

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

License

MIT

來源:README.md,提交 734ad18

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。