Claude Code

Claude Code Integration

Claude Code is Anthropic's official CLI coding agent. With IntlPull's MCP server, you can manage translations directly from the command line using natural language.

Quick Start

1. Install the MCP server:

npm install -g @intlpullhq/mcp-server

2. Add to your Claude Code MCP config:

# ~/.config/claude/mcp.json (or the appropriate config path)
{
"mcpServers": {
"intlpull": {
"command": "npx",
"args": ["-y", "@intlpullhq/mcp-server"],
"env": {
"INTLPULL_API_KEY": "ip_live_your_api_key"
}
}
}
}

CLAUDE.md Configuration

Add i18n guidelines to your CLAUDE.md file so Claude understands your translation workflow and conventions:

## i18n Workflow
This project uses IntlPull for translation management.
### Key Conventions
- Use IntlPull MCP to create and manage translation keys
- Namespace format: feature.section.element (e.g., checkout.form.submitButton)
- Never hardcode user-facing strings
- Always add context descriptions for translators
### Translation Commands
- Create key: Use IntlPull MCP to create keys with English values
- Translate: Run `npx @intlpullhq/cli upload` after adding new keys
- Sync: Run `npx @intlpullhq/cli download` to get latest translations
### Project Structure
- Translation keys: ./messages/{lang}.json
- Source language: English (en)
- Target languages: Spanish (es), French (fr), German (de)

Custom Slash Commands

Create custom slash commands for common translation tasks. Add to your Claude Code skills configuration:

{
"skills": [
{
"name": "translate",
"description": "Translate missing strings to a language",
"prompt": "Use IntlPull MCP to find and translate all missing strings to ${language}"
},
{
"name": "i18n-status",
"description": "Check translation progress",
"prompt": "Use IntlPull MCP to check translation status and show missing translations"
},
{
"name": "extract-strings",
"description": "Extract hardcoded strings from a file",
"prompt": "Scan the current file for hardcoded strings and create translation keys for them"
}
]
}

Then use /translate Spanish in Claude Code to translate all missing strings to Spanish.

Example Workflow

Here's a typical workflow for adding i18n to a new component:

Step 1: Extract strings

"Extract all hardcoded strings from CheckoutForm.tsx to translation keys"

Claude will identify user-facing strings and create keys in IntlPull.

Step 2: Update component

"Update CheckoutForm.tsx to use the new translation keys with react-i18next"

Claude will replace hardcoded strings with t() function calls.

Step 3: Translate

"Translate the new keys to Spanish, French, and German"

Claude will use IntlPull to translate all new keys.

Step 4: Sync

"Pull the latest translations to my local files"

Claude will download the translated JSON files.

Pro Tips

Be specific about namespaces

Tell Claude which namespace to use: "Create keys in the checkout namespace" prevents inconsistent key organization.

Add context for translators

Ask Claude to include context descriptions when creating keys. This helps human translators understand the usage context.

Use translation branches

For feature work, ask Claude to create a translation branch first. This keeps your main translations clean during development.

Next Steps

    Claude Code Integration - IntlPull Documentation | IntlPull