-
Notifications
You must be signed in to change notification settings - Fork 506
Localization with AI
This page is split for two audiences:
-
If your language is missing in POEditor, contact a project admin or open a GitHub issue to request it.
-
Once the locale is added, you can begin translating terms for it in POEditor.
-
When enough terms are translated, the language can be enabled in the app (see developer steps below).
-
How to use AI for translation:
- Use the
missing-termssystem to get batches of untranslated terms - Paste a batch (e.g.,
ja-1.json) into an AI chat (like Copilot Chat or ChatGPT) with the prompt: "Translate these terms to [language]. Return only the JSON with translations." - Review and copy the AI's output back into the file, or use an agent to apply the changes
- Use the
-
Best practices:
- Work in small batches (50–100 terms)
- Start with easy/common terms (months, days, UI labels)
- Review context for ambiguous terms
- Use consistent translations for repeated UI terms
-
Track your progress:
- Mark which batches are done and merge them into the main locale file
- See CRM/locale/poeditor-audit.md for up-to-date status
-
Add the new locale to
src/locale/locales.jsonwith the correct language code and metadata. -
Create the directory structure:
mkdir -p src/locale/textdomain/<locale>/LC_MESSAGES -
Run
npm run locale:term-extractto generate the initial messages.po. -
Upload the new messages.po to POEditor and add the language in the POEditor project if not already present.
-
Download translations with
npm run locale:downloadafter terms are translated. -
For full details, see CRM/locale/README.md.
-
Reference:
- See CRM/locale/README.md for all technical details, scripts, troubleshooting, and configuration
- See Localization-Management.md for workflow overview
This page documents the workflow, tools, and best practices for using AI to accelerate and improve ChurchCRM localization. It is designed for translators, developers, and contributors who want to leverage the missing-terms system and AI chat agents for efficient translation.
ChurchCRM supports 45+ languages. To keep translations up-to-date and high quality, we use a combination of:
- POEditor (professional translation platform)
- Automated scripts (for extracting, downloading, and auditing terms)
- AI chat agents (for rapid, context-aware translation of missing terms)
-
The
missing-termsdirectory (for batching and managing incomplete translations)
- locale:build: Extracts all translatable terms from the codebase.
-
locale:download [--locale]: Downloads translations from POEditor. Use
--localefor a single language (much faster). -
locale:missing: Generates JSON files in
locale/missing-terms/for each locale with missing or empty translations, split into manageable batches. - locale:audit: Checks for completeness and consistency across all locales.
-
locale/missing-terms/: Directory containing per-locale, per-batch JSON files of untranslated terms (e.g.,
ja-1.json,hi-2.json).
-
Generate missing-terms files
- Run
npm run locale:missingafter updating source terms or downloading from POEditor. - This creates files like
locale/missing-terms/ja-1.json, each containing a batch of untranslated terms for a locale.
- Run
-
Feed batches to AI for translation
- Open a batch file (e.g.,
ja-1.json). - Paste its contents into an AI chat (like GitHub Copilot Chat, ChatGPT, or similar) with a prompt:
"Translate these terms to Japanese. Return only the JSON with translations."
- Review and copy the AI's output back into the file, or use an agent to apply the changes directly.
- Open a batch file (e.g.,
-
Repeat for all batches/locales
- Work through each batch file for the target locale(s).
- For large languages, prioritize easy/common terms first (months, days, UI labels).
-
Merge and upload
- Once all batches are translated, merge them into the main locale file (e.g.,
src/locale/ja_JP.json). - Optionally, upload to POEditor for professional review and further translation.
- Once all batches are translated, merge them into the main locale file (e.g.,
-
Rebuild and audit
- Run
npm run locale:buildandnpm run locale:auditto ensure all terms are present and correct.
- Run
- Batch size: Keep each JSON batch small (50–100 terms) for best AI results.
- Easy terms first: Start with months, days, directions, and simple UI terms—these are high-confidence and universal.
- Review context: For complex or ambiguous terms, provide extra context or review AI output carefully.
- Standardize: Use consistent translations for repeated UI terms (e.g., "View", "OK", "Yes", "No").
- Document changes: Track which batches have been translated and merged.
Translate these terms to Hindi. Return only the JSON with translations. [Paste contents of
hi-1.jsonhere]
- Share this workflow with translators and contributors.
- Encourage use of the
missing-termssystem for any new or updated locale. - Use the wiki to track progress and share best practices.
Last updated: December 2025
- Installation Guide ← Start here!
- First Run Setup
- Features Overview
- Upgrade Guide
- Backup & Restore
- Rollback Procedures
- File Permissions
- Troubleshooting
- Logging & Diagnostics
- SSL/HTTPS Security
- Localization Overview