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) »
  • Multiple languages in Joomla
Pages: [1]

Author Topic: Multiple languages in Joomla  (Read 7586 times)

theDigger

  • Guest
Multiple languages in Joomla
January 28, 2009, 08:49:39 am
Hello!

I've tried to find some information on how to handle languages and I have one simple questiion:

Is it possible to get Civicrm to change the language of the current page when you change language with the joomfish language selector?

I'm running Civicrm 2.2 and Joomla 1.5.

Thanks!
Nils

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multiple languages in Joomla
January 28, 2009, 11:02:46 pm
Quote
Is it possible to get Civicrm to change the language of the current page when you change language with the joomfish language selector?

Nope.

Kurund
Found this reply helpful? Support CiviCRM

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Multiple languages in Joomla
January 29, 2009, 03:15:22 am
Quote from: theDigger on January 28, 2009, 08:49:39 am
Is it possible to get Civicrm to change the language of the current page when you change language with the joomfish language selector?

I haven’t used Joom!Fish, so I don’t have the slightest idea how it works, but you can change CiviCRM pages’ languages by simply appending …&lcMessages=xx_XX to the URL – so possibly a small hack to Joom!Fish’s code could make it also switch CiviCRM languages.b
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

theDigger

  • Guest
Re: Multiple languages in Joomla
January 30, 2009, 08:56:19 am
Thanks for your answers.

The Joomfish url:s are affected by the SEO component (sh404SEF) so at least for me it would be hard to do it this way.

Would it be possible to make civicrm sense the active language in joomla and use it as well? Is there a specific file in civicrm where the language is set?

This code checks the current language in joomla:
Code: [Select]
$jfcookie = JRequest::getVar('jfcookie', null ,"COOKIE");
if (isset($jfcookie["lang"]) && $jfcookie["lang"] != "") {
   $client_lang = $jfcookie["lang"];
}

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multiple languages in Joomla
January 30, 2009, 10:14:45 am

you'll need to modify the code at: CRM/Core/BAO/Setting.php and add the joomla specific stuff

search for lcMessages (approx line 194)

i assume u r running a multi-lingual site

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

theDigger

  • Guest
Re: Multiple languages in Joomla
February 02, 2009, 05:39:28 am
Thank you lobo!

This is what I did:
Code: [Select]
if ($multiLang) {
$jfcookie = JRequest::getVar('jfcookie', null ,"COOKIE");
if (isset($jfcookie["lang"]) && $jfcookie["lang"] != "") {
   $client_lang = $jfcookie["lang"];
}
switch ($client_lang) {
case 'sv' :
$lcMessages = 'sv_SE';
$session->set('lcMessages', $lcMessages);
break;
case 'en' :
$lcMessages = 'en_US';
$session->set('lcMessages', $lcMessages);
break;
default:
$lcMessages = 'en_US';
$session->set('lcMessages', $lcMessages);
}
}

Is there a utility to translate content in the database?

theDigger

  • Guest
Re: Multiple languages in Joomla
February 02, 2009, 05:46:58 am
Quote from: theDigger on February 02, 2009, 05:39:28 am

Is there a utility to translate content in the database?


Ah! Found the language selector to the left...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Multiple languages in Joomla

This forum was archived on 2017-11-26.