4

I've followed the instructions for setting up multilingual access (english & spanish) but no language switcher is appearing.

Drupal 8 install.

I'm able to select both languages in the language settings. Everything seems to go fine, but no switcher.

Where is the switcher supposed to appear? Only at login? I seem to recall reading that it would show up on various pages but may be mis-remembering.

  • perhaps link to the documentation. as i recall this may have been something that worked in d7 but hasn't necessarily been done for d8 – petednz - fuzion Aug 21 at 22:17
  • I think petednz is right. You can try the kamlanguage extension instead which adds a menu entry lab.civicrm.org/extensions/kamlanguage – Demerit Aug 22 at 9:07
2

Usually what you want to do is use the Drupal language switcher and choose the option in (civicrm/admin/setting/localization?reset=1) that tells CiviCRM to follow the language that Drupal is using ("inherit CMS language").

To work properly, that option requires you to fill out a couple of lines in the civicrm.settings.php that are commented out by default, but which tells civicrm how to map the Drupal language settings (which are just two letter language codes) over to CiviCRM language codes (which are two letter followed by a region code).

Here's an example from a Canadian bilingual site of mine:

# grep LANG civicrm.settings.php
define('CIVICRM_LANGUAGE_MAPPING_FR', 'fr_CA');
define('CIVICRM_LANGUAGE_MAPPING_EN', 'en_CA');
// define('CIVICRM_LANGUAGE_MAPPING_ES', 'es_MX');
// define('CIVICRM_LANGUAGE_MAPPING_PT', 'pt_BR');
// define('CIVICRM_LANGUAGE_MAPPING_ZH', 'zh_TW');
| improve this answer | |

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.