Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13068

Add "LC_MESSAGES" in l10n directory hierarchy to simplify "Native gettext"

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.5
    • Fix Version/s: 4.5
    • Component/s: None
    • Labels:

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mlutfy Mathieu Lutfy
                Reporter:
                mlutfy Mathieu Lutfy
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: