Details
Description
Currently, to use "native gettext" (which offers a 20% performance boost to localized/multi-lingual installs), we need to do basically three things:
- make sure that the base operating system has the locale enabled, ex: fr_CA.utf8
- define a constant in civicrm.settings.php, ex: define('CIVICRM_GETTEXT_NATIVE', 1);
- move files around in the l10n directory so that it has the following structure: civicrm/l10n/LC_MESSAGES/fr_CA/civicrm.mo, instead of currently: civicrm/l10n/fr_CA/civicrm.mo. – this is something imposed by gettext in general.
To make it easier to enable native gettext, I would like the l10n directory hierarchy to be in the correct form by default (civicrm/l10n/LC_MESSAGES/fr_CA/civicrm.mo).
Changes required:
- distmaker needs to generate the files with the right hierarchy (or modify SVN/git setup)
- CRM/Core/I18n.php for php-gettext (non-native) will need to search in $config->gettextResources . '/LC_MESSAGES/[...]/;
And then we need to blog about it, so that people who will update their translations using civicrm-l10n.tar.gz will not be confused.