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) »
  • Variable email greetings? (French)
Pages: [1]

Author Topic: Variable email greetings? (French)  (Read 849 times)

vavroom

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 4
    • Part of a Whole
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress
  • MySQL version: 5.6.11
  • PHP version: 5.5.3
Variable email greetings? (French)
October 12, 2013, 04:38:07 pm
I've searched but can't seem to find the answer to this. If there is a resource that exists, please point me to it.

I am setting up a mostly French group of people. I see where I can edit the email greeting options (Dear {contact.firstname}), but in French the greeting depends on the gender of the contact ('cher' for men, 'chère' for women). Is there a way to automatically use one or the other depending on the gender? Or do i need to add both options and then manually set them up for each new contact? I'd rather avoid that as we have a database (Excel spreadsheet, yuck) of nearly 10,000 people that I'll be porting to CiviCRM. The less manual adjustments I have to do, the better.

Thank you for any and all assistance.

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: Variable email greetings? (French)
October 13, 2013, 07:00:58 am
In CiviCRM 4.3 / 4.4, you can have a custom greeting that you can manually type in, but not an easy way to automate it so that a contacts automatically gets "cher [...]" or "chère [...]". You can use a hook and program something custom, but it requires to do it with custom PHP. I vaguely remember some people posting their code for specific use-cases, but I can't really find any while googling. The closest I found was: http://forum.civicrm.org/index.php?topic=19467.0

In CiviCRM 4.5, which is still at an early stage of its development cycle (4.4 will be released in a few weeks, so 4.5 will be released in 7-8 months), this issue has been fixed: greetings types can include smarty, so with a one-line copy-pasted smarty code, we could have custom greetings for various languages. For example, for German in CiviCRM 4.5: http://wiki.civicrm.org/confluence/display/CRMDOC/Recipe+for+German+Name+and+Greetings+Handling

I'm not sure how easy it would be to backport into an extension the code that is specifically for that. The patch that went into 4.5 solves the problem we have in French, but also that of German, which uses more complex formal greetings, so the patch is pretty big.

If you would like to review the code for 4.5, the pull-request is here:
https://github.com/civicrm/civicrm-core/pull/1457

Olaf also made a detailed blog post here: https://civicrm.org/blogs/antrik/enhancing-greetings-handling

PS: you might also want to post on the Francophone forum: http://forum.civicrm.org/index.php/board,58.0.html

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

vavroom

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 4
    • Part of a Whole
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress
  • MySQL version: 5.6.11
  • PHP version: 5.5.3
Re: Variable email greetings? (French)
October 14, 2013, 06:27:52 am
Merci Mathieu :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Variable email greetings? (French)

This forum was archived on 2017-11-26.