Skip to main content
Glama
rog0x

@rog0x/mcp-i18n-tools

by rog0x

@rog0x/mcp-i18n-tools

AIエージェント向けの国際化・ローカライゼーションツールです。MCP(Model Context Protocol)サーバーとして公開されています。

ツール

detect_locale

指定されたテキスト文字列の言語とロケールを検出します。検出された言語コード(BCP 47)、言語名、文字体系、信頼度スコア(0〜1)、および代替言語候補を返します。

対応言語: 英語、スペイン語、フランス語、ドイツ語、ポルトガル語、イタリア語、ロシア語、日本語、韓国語、中国語、アラビア語、ヒンディー語、タイ語、ギリシャ語、ヘブライ語。

extract_i18n_keys

ソースコード内にハードコードされた、国際化が必要なユーザー向け文字列を抽出します。以下の場所から文字列を検出します:

  • JSX/TSX属性(title、placeholder、label、alt、aria-label など)

  • HTMLテンプレートのテキストと属性

  • console.log / console.warn / console.error の呼び出し

  • throw new Error(...) のメッセージ

  • alert() / confirm() / prompt() ダイアログ

  • i18n関連の名前を持つ変数への代入(message、label、title など)

各文字列について、行/列、周囲のコンテキスト、パターンタイプ、提案される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を使用して、任意のロケールに対して数値、通貨、日付、相対時間をフォーマットします。以下に対応しています:

  • 数値 — decimal、percent、unit、compact/scientific/engineering 表記

  • 通貨 — symbol、narrowSymbol、code、name 表示

  • 日付 — short、medium、long、full スタイルと日付部分の内訳

  • 相対時間 — long、short、narrow スタイルと自動数値フォーマット

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to manage Xcode projects by listing targets, reading configurations, and triggering builds via the Model Context Protocol. It facilitates natural language interaction with macOS developer tools to streamline iOS app development processes.
    6
    127 npm
    MIT