My site is translating Yes to Si for French (fr_FR). I've confirmed that:

  1. I don't have any word replacments for Yes.
  2. Most everything else is translated correctly.
  3. I've got an up-to-date civicrm.po file for fr_FR and it contains the correct translation of "Oui".

I've even installed the brilliant de.systopia.l10nmo and org.civicrm.l10nx extensions and uploaded an override .mo file.



In the file /CRM/Core/BAO/WordReplacement.php you've got this delightful stanza:

// So. Weird. Some bizarre/probably-broken multi-lingual thing where
// data isn't really stored in civicrm_word_replacements. Probably
// shouldn't exist.
$stringOverride = self::_getLocaleCustomStrings($id);
$stringOverride[$config->lcMessages] = $overrides;

And digging in, you'll see it does this:

$domain = CRM_Core_DAO::executeQuery('SELECT locale_custom_strings FROM civicrm_domain WHERE id = %1', [
  1 => [$domainId, 'Integer'],

In other words, it's pulling word replacement information from a field in the civicrm_domain file which is no longer accessible or used in the UI.

I looked in there and sure enough, I had an old collection of translations. By setting the field to empty, it solved the problem.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.