glot
AI-native i18n: live string context, validated translations, glossary for your app catalogs
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
glot-i18nclaude mcp add glot -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- npx -y glot-i18n@0.4.0 mcp
{
"mcpServers": {
"glot": {
"command": "npx",
"args": [
"-y",
"glot-i18n@0.4.0",
"mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<your anthropic_api_key>"
}
}
}
}
Variables d'environnement
ANTHROPIC_API_KEYsecret LLM key used by the translate tool (or OPENAI_API_KEY, per glot.toml). Not needed for context, check or add.
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
glot
Your coding agent localizes your app. Deterministic code guarantees that nothing broken or too long lands in your catalogs.
The real glot translate binary. The LLM is scripted to get three strings wrong on its first pass; every refusal and message is glot's. Reproduce it, or rerun it with a real model doing the retries: docs/launch/record/refusal.sh.
npx glot-i18n init # detect your i18n stack, write glot.toml + rules for your coding agent
npx glot-i18n i18nize # hardcoded UI strings -> keys, components rewritten (next-intl, react-i18next)
npx glot-i18n translate # translate only the delta; invalid output is refused, retried, never written
Or all of it in one idempotent step: npx glot-i18n localize --yes --targets fr,de (init if needed → i18nize → translate → check).
Guarantees
Checked by code on every LLM output, on glot set, in the overlay and in CI (glot check). A refused string goes back to the model with the exact reason (2 retries, then the fallback model); if it still fails, nothing is written.
| Placeholders | {name}, {{name}}, tags: same set as the source, none invented, none translated. ICU, i18next and MessageFormat 2 syntax parsed. |
| CLDR plurals | Every category the target locale needs (pl: one, few, many, other; ar: six of them). |
| Glossary | glossary.toml in your repo: required and forbidden translations, do-not-translate terms. |
| Pixel width | glot measure records each key's box and font from your running app; translations are shaped with that font and refused if wider. glot fit shortens what already overflows. |
| Lockfile | glot.lock hashes source and target: only the delta is translated, and a hand edit is never overwritten without --force. |
| MCP for your agent | glot mcp gives Claude Code, Cursor or Codex your keys, their usages (file:line, UI role), the glossary, and tools that add strings through the same validator. |
Works with the i18n library you already use, adds no runtime, bring your own LLM key (Anthropic, OpenAI, any OpenAI-compatible endpoint). MIT.
More: Docs (concepts, CLI, MCP, integrations & GitHub Action, agent skill, AI-translation provenance, FAQ & costs) · Labs (SEO, database content, emails/images, task parity, plural coverage…) · Self-hosted server (experimental) · Demo app · Architecture
Questions fréquentes
Qu'est-ce que glot ?
AI-native i18n: live string context, validated translations, glossary for your app catalogs
Comment installer glot ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add glot -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- npx -y glot-i18n@0.4.0 mcp. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour glot ?
Oui. Il attend ANTHROPIC_API_KEY, à renseigner dans sa configuration.
glot est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient glot ?
Il est publié par MattJeff. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.