-
-
Notifications
You must be signed in to change notification settings - Fork 520
Server Locale Requirements
ChurchCRM uses GNU gettext for internationalization and translation support. For translations to work, the server operating system must have the required locales installed. This is a system-level requirement configured outside ChurchCRM.
-
System-wide (server) locale: The server default locale is used for unauthenticated users, background jobs, and when PHP calls
setlocale()during page rendering. This is the locale that GNUgettextrelies on to load.mofiles for server-rendered strings. - User locale override: Logged-in users can set a preferred language in their profile. When present, the user preference overrides the system default for that user session and UI rendering.
- Client-side (JS) vs server-side (PHP): ChurchCRM uses two localization systems: PHP/Gettext for server-rendered strings and JavaScript/i18next (or compiled JSON files) for client-side UI. Both must be present and kept in sync to avoid partially translated pages.
Precedence: User preference → System default → Browser/Accept-Language → Super-base (English).
The PHP gettext extension uses the operating system's locale libraries. When you select a language in ChurchCRM:
- ChurchCRM calls PHP's
setlocale()with the selected language code - PHP gettext looks for that locale on the system
- If the locale is not installed, gettext silently falls back to English
- Translation files (
.mo) are only loaded if the system locale exists
:::important Not enough to have .po/.mo files Translation files in ChurchCRM are not sufficient. The system must have the locale installed. :::
locale -a
locale -a | grep es_ESlocalectl list-locales
localectl list-locales | grep es_ES# Install specific locale (e.g., Spanish)
sudo locale-gen es_ES.UTF-8
# Multiple locales
sudo locale-gen es_ES.UTF-8 fr_FR.UTF-8 de_DE.UTF-8
sudo update-localeAlternative — edit /etc/locale.gen, uncomment the locales you need, then run sudo locale-gen.
# Install language pack (e.g., Spanish)
sudo dnf install glibc-langpack-es
# Multiple packs
sudo dnf install glibc-langpack-es glibc-langpack-fr glibc-langpack-de| Language | Debian/Ubuntu | Rocky/RHEL |
|---|---|---|
| Spanish | locale-gen es_ES.UTF-8 |
dnf install glibc-langpack-es |
| French | locale-gen fr_FR.UTF-8 |
dnf install glibc-langpack-fr |
| German | locale-gen de_DE.UTF-8 |
dnf install glibc-langpack-de |
| Portuguese (Brazil) | locale-gen pt_BR.UTF-8 |
dnf install glibc-langpack-pt |
| Chinese | locale-gen zh_CN.UTF-8 |
dnf install glibc-langpack-zh |
| Japanese | locale-gen ja_JP.UTF-8 |
dnf install glibc-langpack-ja |
After installing system locales:
- Log in as administrator
- Go to Admin → Edit General Settings
- Open the Localization (or System Settings → Localization) tab
- Set Language to the desired locale
- Save
- Verify the locale is installed:
locale -a | grep <locale> - Install the missing locale (see above)
- Restart the web server:
sudo systemctl restart apache2 # or httpd # or for PHP-FPM + nginx: sudo systemctl restart php-fpm nginx
- Clear browser cache and reload ChurchCRM
If some parts of the UI are translated and others are not, check both systems:
-
PHP / Gettext
- Confirm
.mofiles exist underlocale/LC_MESSAGES/messages.mo(or your configured textdomain path). - Verify the active locale via a small PHP test page that calls
setlocale(LC_ALL, 0)and prints the result. - Ensure PHP's
gettextextension is installed (php -m | grep gettext) and that the server has the matching system locale installed.
- Confirm
-
JavaScript / i18next (client)
- Ensure the compiled JSON files exist in
src/locale/i18n/(orsrc/locale/textdomaindepending on your build). - Open the browser devtools Network tab and confirm the i18n JSON file for the chosen locale is being fetched (200 OK). If missing, your build step may not have produced the file.
- Check the console for i18next errors or missing-key fallbacks.
- Ensure the compiled JSON files exist in
-
Synchronization
- Run the localization build and download pipeline locally:
npm run locale:build→ upload.pofiles to POEditor →npm run locale:downloadto fetch both approved translations and missing-term batches. - If server pages (PHP) remain English while client UI is translated, the server locale is likely missing; install the OS locale and restart the webserver / PHP-FPM.
- Run the localization build and download pipeline locally:
-
Quick checks
- Confirm user locale setting in Admin → Edit General Settings (and user profile preference).
- Verify
src/locale/i18n/<locale>.jsonexists and contains translated keys. - Check file permissions on
src/locale/i18nandlocale/termsso the web user can read them.
You can quickly confirm what the server supports using the built-in Debug page:
- Log in as an administrator.
- Go to Admin → System → Debug (
/admin/system/debug). - Open the Locale Support card. It shows a summary (
System Locale Support) and a table of ChurchCRM-supported locales with a System column indicating whether each locale is installed on the server (Yes/No). - If your desired locale shows No, install the OS locale (see "Install Locales" above) and then reload the Debug page after restarting the webserver/PHP-FPM.
This page also surfaces timezone and PHP configuration information that can help with localization troubleshooting.
php -m | grep gettext
# Install if missing: apt install php-gettext or dnf install php-gettextIf you use shared hosting or a managed platform and cannot install locales yourself, share this message with your hosting provider:
Subject: Request to install system locales and PHP i18n support for ChurchCRM
Hello,
We are running ChurchCRM (a PHP application) and need the following server-side localization support so translations work correctly for our users:
- Install the requested system locales (UTF-8 variants). Example locales we need:
en_US.UTF-8,en_GB.UTF-8,es_ES.UTF-8,fr_FR.UTF-8,de_DE.UTF-8,pt_BR.UTF-8,zh_CN.UTF-8,zh_TW.UTF-8. Please install the relevant locales for our target audience. - On Debian/Ubuntu: run
locale-gen <locale>andupdate-localeor uncomment and runsudo locale-genfor required entries. - On RHEL/CentOS/Rocky: install language packs, e.g.
sudo dnf install glibc-langpack-es glibc-langpack-fr. - Ensure UTF-8 variants are available (e.g.,
es_ES.UTF-8) rather than legacy encodings. - Restart the webserver and PHP-FPM after installation.
- Please confirm PHP has the
gettextextension enabled (andintlif available). You can check withphp -m | grep gettextandphp -m | grep intland enable packages if missing.
Why this is needed: PHP's gettext reads system locale data to load translation files (.mo). Without the system locales installed, ChurchCRM will silently fall back to English even if translation files are present.
Thank you — please respond with confirmation and the list of locales you installed.
- Home
- Wiki → Docs links — User & admin manuals moved to docs.churchcrm.io
→ docs.churchcrm.io for installation & setup
- Installation ← Start here!
- First Run Setup
- Features Overview
→ docs.churchcrm.io for user manuals
- User Guide (docs)
- People Management — docs
- Groups & Events
- Tools
- Finances
→ docs.churchcrm.io for admin manuals
- User Management
- System Maintenance
- Configuration
- Troubleshooting
- Localization
Contributing to ChurchCRM
- Quick Start
- Testing & CI/CD
- Code & Architecture
- Localization
- Release & Security