CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Multi language settings confusion
Pages: [1]

Author Topic: Multi language settings confusion  (Read 1260 times)

mcternan

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.10
  • MySQL version: 5.1.58
  • PHP version: 5.3
Multi language settings confusion
March 28, 2013, 02:16:20 am
I may be missing something somewhere but I am having the hardest time figuring out how multi language support works.

I have been able to install the functionality and enable Japanese as a secondary language (default being English).

My confusion arises from how the languages are now displayed.

I have come across the lcMessages=<lang> URL parameter, but I was hoping there would be some way for CiviCRM to auto-detect the users Locale or AcceptedLanguage and set the language based on that.

Is that even possible? And if so is there anything that needs to be configured to enable this?

Failing that, is there a way to provide users with a way to change language or to set the lcMessages session val?

Cheers,

Conor

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Multi language settings confusion
March 28, 2013, 07:13:20 am
Hi Conor,

Which front-end are you using for CiviCRM? (Drupal / Joomla / Wordpress?)

With Drupal, for example, CiviCRM can "inherit the locale" from Drupal, so there is no need for the lcMessages variable in URLs. (Drupal has a content-negotiation method for auto-detect languages, presumably Joomla and WP also have)

Otherwise, CiviCRM has two ways to set the locale:

* lcMessages variable in the URL parameter, as you mentioned,
* CiviCRM language switcher block

There isn't an integrated method in CiviCRM itself for auto-detection though.

Mathieu
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

mcternan

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.10
  • MySQL version: 5.1.58
  • PHP version: 5.3
Re: Multi language settings confusion
March 28, 2013, 05:43:51 pm
Mathieu,

Apologies, I forgot to mention our frontend/versions. We are running CiviCRM 4.2 with Drupal 7.

Is there anything I would need to enable in Drupal in order to take advantage of the auto-detect?

Cheers,

Conor

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Multi language settings confusion
March 29, 2013, 07:33:53 am
Hi Conor,

In Drupal, you can configure language negotiation based on the browser's language in /admin/config/regional/language/configure.

And don't forget to enable the "inherit CMS language" from CiviCRM Admin > Localization.

Don't forget that language detection is not perfect, since most users do not know this configuration exists (the setting for language negotiation is usually hard to find). Depending on how they installed their browser, it may or may not have automatically configured the correct language.

Browser language detection also does not work with agressive caching such as Varnish, unless you handle the auto-detection in Javascript or IP geo-localisation (you probably don't need to worry about that unless your site has a lot of traffic).

Mathieu
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Multi language settings confusion

This forum was archived on 2017-11-26.