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) »
  • Restrict preferred language
Pages: [1]

Author Topic: Restrict preferred language  (Read 3580 times)

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Restrict preferred language
January 23, 2011, 07:02:11 am
Hello all,

In my user registration form, people can specify their preferred language. We would however like to restrict that language to only three languages. However, after deactivating all the non-used languages in the "Language Options", the registration form still hows the language abreviations (like en_GB, sl_SI, ... see attachment). Is there a way to deactivate these too?

And another question: These language options only show in English. Does anyone know if there is a way to translate them? 

Simon

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Restrict preferred language
January 25, 2011, 03:58:42 am
Quote from: Simon147 on January 23, 2011, 07:02:11 am
In my user registration form, people can specify their preferred language. We would however like to restrict that language to only three languages. However, after deactivating all the non-used languages in the "Language Options", the registration form still hows the language abreviations (like en_GB, sl_SI, ... see attachment). Is there a way to deactivate these too?

What version of CiviCRM are you using? Is it 3.2.5 (as per your profile information)?

I edited the default profile on our demo install and it seems to work properly:

http://drupal.demo.civicrm.org/civicrm/profile/create?gid=1&reset=1
http://drupal.demo.civicrm.org/civicrm/admin/optionValue?reset=1&action=browse&gid=57

(disabling Afrikaans made it disappear from the list). Demo uses CiviCRM 3.3.3.

Quote
And another question: These language options only show in English. Does anyone know if there is a way to translate them?

You should be able to edit them in the database (probably best via the admin interface above).
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.

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Restrict preferred language
January 25, 2011, 10:57:19 am
Hello,

Actually, I'm in Version 3.3.3 (just forgot to update my profile).

I see that it's working in the demo version. In mine, it isn't. You may want to check my signup form here http://www.asca-vabs.ch/user/register

As for the languages: I've tried to add the different languages in "description", however, that doesn't show in the form.

Simon

cray146

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Re: Restrict preferred language
February 14, 2011, 02:33:43 am
I can confirm Simons problem. I have a multilang (Dutch/French) CiviCRM v3.3.3 installation. I disabled all languages in option group languages except for Dutch and French. However, when I try to set the preferred language via the contact screen of via a profile, the option list includes other languages too (presented using the language code instead of language name).

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Restrict preferred language
February 14, 2011, 03:16:09 am
How does it look in your: /civicrm/admin/optionValue?reset=1&action=browse&gid=57


Like there  ?

http://drupal.demo.civicrm.org/civicrm/admin/optionValue?reset=1&action=browse&gid=57

Did you disable or delete ?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Restrict preferred language
February 14, 2011, 03:43:59 am
In my  case, no list shows at /civicrm/admin/optionValue?reset=1&action=browse&gid=57 (see attached screenshot).

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Restrict preferred language
February 14, 2011, 04:12:42 am
Hi,

Probably means that the option group isn't 57. Pretty sure Dave greenberg gave the solution on how to find it a couple of weeks ago in this forum.


Could you try finding it and post a link here if you did ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Restrict preferred language
February 14, 2011, 04:25:15 am
The language options are under civicrm/admin/options/language?group=languages&reset=1 in my case. They show quite similarly to the demo site, except that I have disable all languages except the ones I would like to offer (see attachement).

Simon

PS: When I load that site, there is some javascript running that completly blocks firefox for something like 20 seconds. Does the same appear in your case? 

cray146

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Re: Restrict preferred language
February 14, 2011, 05:36:39 am
Hi Xavier,

Mine is under http://example.com/nl/civicrm/admin/optionValue?reset=1&action=browse&gid=63. None of the options were deleted, unwanted options were disabled only.

Thank,

c.

pragmateam

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Joomla
  • MySQL version: 5
  • PHP version: 5
Re: Restrict preferred language
October 01, 2011, 03:23:59 pm
Hello,

I had the same issue: preferred language was showing 2 letter codes in profiles. I discovered that in civicrm/CRM/Core/I18n.php, CRM_Core_I18n::languages() takes all the languages from the database and also the languages from the disk that are present in the directory civicrm/l10n. So I deleted/moved the subfolders corresponding to languages I did not want to use. Now it is working as I needed.

Good luck.

Habbakuk

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Joomla
  • MySQL version: 5.5.18
  • PHP version: 5
Re: Restrict preferred language
December 05, 2011, 09:29:08 pm
I've been having similar problems. I am trying to change my preferred language. I went to Global Settings >> Localizations, and changed Default Language, but my website is still showing up in en_US.

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

This forum was archived on 2017-11-26.