Skip to end of metadata
Go to start of metadata

TABLE OF CONTENTS

This page describes problems encountered during the CiviCRM's internationalisation and localisation process.

Smarty template caching

Smarty caches the template results (in the civicrm/templates_c subdirectory of the files directory defined in Drupal - in my case it's /var/www/drupal/files/civicrm/templates_c). Deleting this directory can solve problems with changes not appearing in the rendered pages.

Gettext is not thread-safe

Gettext is not thread-safe, which means it's often not enough to regenerate the civicrm.mo file; if changes to this file are not being displayed, most probably the HTTP server needs to be restarted.

Note: We've solved this by resigning from PHP's gettext implementation and switching to PHP gettext.

Drupal caching

Drupal caches a lot of strings on its own; if you update the strings in modules/civicrm.module and/or their translations in the Gettext files and the changes are not being displayed (and it's the issue with Gettext), try emptying the cache table from Drupal's database.

Locale changes vs. multi-threaded server

If, after regenerating various locales, the HTTP server doesn't pick up the newly-generated ones (e.g. for use with PHP's strftime()), it might need restarting.

Labels:

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.