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) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Tokens in the other language...
Pages: [1]

Author Topic: Tokens in the other language...  (Read 536 times)

Hans.S

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 5
Tokens in the other language...
January 26, 2011, 07:22:49 am
I have to create a bilingual French/English automated receipt/invoice email because there are problems with PayPal not recognizing the second language (FR_CA) and sending receipt in English.

How do I insert a mail token for the second language in the same email?

For example English {$membership_name} French {$membership_name}

Any help or pointers are greatly appreciated. I'm in a tight spot here. :P

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: Tokens in the other language...
January 26, 2011, 08:15:34 am

how about using the token hook and introducing the new token there:

fr.membership_name (or something like that?)

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

Hans.S

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 5
Re: Tokens in the other language...
January 26, 2011, 08:46:20 am
Thanks for your reply.

I am looking here:

http://wiki.civicrm.org/confluence/display/CRMDOC32/CiviCRM+hook+specification

I don't really understand this....

How will the french token pick up the translation value of the English token based on which ever membership created by the contribution form?

In the email code can I add a conditional statement that says if the value of {$membership_name} is x put text y?

{if $membershipname  eq 'Test Membership'}
      <p>Adhesion Test</p>
      {/if}
Something like that?

 Somebody please, I'm not a coder.  :-\
« Last Edit: January 26, 2011, 12:59:59 pm by Hans.S »

Hans.S

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 5
Re: Tokens in the other language...
February 09, 2011, 07:07:45 am
Here is the correct syntax to swap out text in an email template.

{$membership_name}
{if $membership_name eq 'English text'}French text
{else}&nbsp; {/if}

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Tokens in the other language...

This forum was archived on 2017-11-26.