Ship global products faster with AI-powered internationalization.
An intelligent i18n assistant that automates the tedious parts of internationalization:
Traditional i18n workflow is painful:
cuihua-i18n-helper automates ALL of this.
Tell your OpenClaw agent:
"Extract all translatable strings from src/"
The agent will:
"Translate to Chinese, Japanese, and Spanish"
The agent will:
"Check for missing translations"
The agent will:
Automatically detects translatable content:
jsx
// Before
<button>Submit</button>
<p>Hello, {username}!</p>
<input placeholder="Enter email" />
// After extraction
<button>{t('button.submit')}</button>
<p>{t('greeting.hello', { username })}</p>
<input placeholder={t('form.email_placeholder')} />
Supports:
Creates semantic, readable translation keys:
json
{
"button": {
"submit": "Submit",
"cancel": "Cancel",
"save": "Save"
},
"greeting": {
"hello": "Hello, {{username}}!",
"welcome": "Welcome back"
},
"form": {
"email_placeholder": "Enter email",
"password_placeholder": "Enter password"
}
}
Smart features:
Translate to 100+ languages instantly:
Supported providers:
Smart translation:
{{count}}, {username}<strong>Bold</strong>© ® ™Example output:
json
// en.json
{
"user": {
"greeting": "Hello, {{name}}!",
"items_count": "You have {{count}} items"
}
}
// zh.json (Chinese)
{
"user": {
"greeting": "你好,{{name}}!",
"items_count": "你有 {{count}} 个物品"
}
}
// ja.json (Japanese)
{
"user": {
"greeting": "こんにちは、{{name}}さん!",
"items_count": "{{count}}個のアイテムがあります"
}
}
Automated quality assurance:
Checks:
Example report:
text
🔍 Translation Quality Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Coverage: 95% (190/200 strings)
⚠️ Issues Found: 5
1. Missing translations (zh.json):
- user.profile_updated
- error.network_timeout
2. Placeholder mismatch (ja.json):
- user.items_count
Expected: {{count}}
Found: {count}
3. Excessive length (de.json):
- button.submit_and_continue
English: 21 chars
German: 45 chars (214% longer)
💡 Run with --fix to auto-fix common issues
Works seamlessly with popular frameworks:
React / Next.js:
jsx
import { useTranslation } from 'react-i18next';
function MyComponent() {
const { t } = useTranslation();
return <h1>{t('welcome.title')}</h1>;
}
Vue / Nuxt.js:
vue
<template>
<h1>{{ $t('welcome.title') }}</h1>
</template>
Angular:
html
<h1>{{ 'welcome.title' | translate }}</h1>
Vanilla JS:
javascript
import i18n from './i18n';
document.getElementById('title').textContent = i18n.t('welcome.title');
Automate translation checks in your pipeline:
yaml
# .github/workflows/i18n.yml
name: i18n Check
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check i18n
run: |
openclaw agent run "Check for missing translations"
openclaw agent run "Verify translation quality"
Pre-commit hook:
bash
#!/bin/bash
# .git/hooks/pre-commit
echo "🔍 Checking i18n..."
openclaw agent run "Check for untranslated strings in staged files"
if [ $? -ne 0 ]; then
echo "❌ Found untranslated strings. Please add translations."
exit 1
fi
User: "Set up i18n for my React project with English and Chinese"
Agent:
text
✅ i18n setup complete:
📦 Installed dependencies:
- react-i18next
- i18next
📁 Created structure:
src/
i18n/
index.js (config)
locales/
en.json
zh.json
⚙️ Configured:
- Default language: en
- Fallback language: en
- Supported languages: en, zh
💡 Next steps:
1. Import i18n in your root component
2. Wrap app with I18nextProvider
3. Use {t('key')} in components
User: "Extract all translatable strings from src/components/"
Agent:
text
🔍 Scanning src/components/...
✅ Found 42 translatable strings:
- Button labels: 12
- Form placeholders: 8
- Error messages: 7
- Page titles: 6
- Tooltips: 5
- Other: 4
📝 Generated locale files:
locales/en.json (42 keys)
locales/zh.json (42 keys, auto-translated)
🔄 Updated components:
- src/components/Button.jsx (3 strings)
- src/components/Form.jsx (8 strings)
- src/components/Header.jsx (2 strings)
...
📊 Coverage: 100%
💡 Review translations in locales/ folder
User: "Add German and French translations"
Agent:
text
🌍 Adding languages: de (German), fr (French)
🤖 Translating 42 strings...
[████████████████████] 100%
✅ Created locale files:
locales/de.json (42 keys)
locales/fr.json (42 keys)
⚠️ Review recommended for:
- Technical terms (3 strings)
- Brand names (1 string)
- Colloquial expressions (2 strings)
📊 Translation provider: DeepL
📊 Cost: $0.02 (42 strings × 2 languages)
💡 Preview: http://localhost:3000?lng=de
User: "Check for missing translations"
Agent:
text
🔍 Checking translation completeness...
📊 Coverage by language:
✅ en: 100% (50/50)
✅ zh: 100% (50/50)
⚠️ ja: 94% (47/50)
⚠️ de: 88% (44/50)
❌ fr: 76% (38/50)
❌ Missing in ja.json (3):
- user.profile_updated
- error.network_timeout
- settings.privacy_policy
❌ Missing in de.json (6):
- user.profile_updated
- user.account_deleted
- error.network_timeout
- error.server_error
- settings.privacy_policy
- settings.terms_of_service
❌ Missing in fr.json (12):
[... list truncated ...]
💡 Fix: openclaw agent run "Translate missing strings to all languages"
User: "Remove unused translation keys"
Agent:
text
🔍 Scanning codebase for used translation keys...
📊 Analysis:
Total keys: 50
Used keys: 45
Unused keys: 5
🗑️ Unused keys found:
- old.deprecated_feature (last used: 6 months ago)
- temp.debug_message (never used)
- test.sample_text (test artifact)
- button.old_submit (replaced by button.submit)
- error.obsolete_error (feature removed)
❓ Remove these keys? (y/n)
User: "Yes"
text
✅ Removed 5 unused keys from all locale files
📁 Updated files:
- locales/en.json (-5 keys)
- locales/zh.json (-5 keys)
- locales/ja.json (-5 keys)
- locales/de.json (-5 keys)
- locales/fr.json (-5 keys)
💾 Backup created: locales/.backup-2026-03-24/
User: "Mark translations needing review"
Agent:
text
🔍 Analyzing translations for review...
⚠️ Flagged for review (8 strings):
1. user.welcome_premium
Translation seems too literal
Suggestion: Use more natural phrasing
2. error.payment_failed (zh)
Contains English words: "payment"
Suggestion: Translate to "支付"
3. button.purchase_now (de)
Too long for button (28 characters)
Suggestion: Shorten to "Jetzt kaufen"
📝 Created review.md with details
💡 Next: Share review.md with translators
Create .i18nrc.json in your project root:
json
{
"sourceLanguage": "en",
"targetLanguages": ["zh", "ja", "de", "fr", "es"],
"localesPath": "./src/locales",
"extractFrom": ["./src"],
"ignore": ["**/*.test.js", "**/*.spec.js"],
"translationProvider": "deepl",
"keyStyle": "nested",
"keyCase": "snake_case",
"placeholderPattern": "{{%s}}",
"qualityChecks": {
"checkMissingTranslations": true,
"checkPlaceholders": true,
"checkLength": true,
"maxLengthRatio": 2.0
}
}
100+ languages including:
Popular:
And many more: Dutch, Swedish, Danish, Polish, Turkish, Thai, Vietnamese, Indonesian, Hindi, Hebrew, Greek, Czech, Romanian, Hungarian, Finnish, Norwegian, Ukrainian, and more!
DeepL (Recommended):
bash
export DEEPL_API_KEY=your_api_key
Google Translate:
bash
export GOOGLE_TRANSLATE_API_KEY=your_api_key
OpenAI:
bash
export OPENAI_API_KEY=your_api_key
react-i18next:
bash
npm install react-i18next i18next
vue-i18n:
bash
npm install vue-i18n
angular-translate:
bash
npm install @ngx-translate/core
MIT License - see LICENSE for details.
Built with 🌸 by 翠花 (Cuihua) for the OpenClaw community.
Special thanks to:
Made with 🌸 | Cuihua Series | ClawHub Pioneer
Ship global products faster with AI-powered i18n.