Email templates: How to create a gender-dependent salutation line?

Hello,

I am currently trying to create an email template in German, but I am having problems with the salutation line. In German the salutation depends on the gender of the recipient. It is “Sehr geehrter Herr xxx” for male and “Sehr geehrte Frau xxx” for female. I think the same is required in other languages as well.

So what I need is a mechanism that uses “geehrter” in the salutation line if the salutation is “Herr” (“Mr.” in English) and “geehrte” if the salutation is “Frau” (“Mrs.” in English).

Can it be done? If changes in the code are required, pointers are welcome on how to do that.

Thanks in advance,

Tobias


SuiteCRM 7.3.1 with German language pack and QuickCRM Mobile installed, OS: Ubuntu Server 14.04 LTS, Webserver: nginx + php-fpm

Servus!!

. What i suggest do should be made upgrade safe… how you make it upgrade safe is up to you.

to tackle this problem you want to look at templateParser.php.

i would then debugg the code using a normal template to work from. i would do this as i can find where the code ‘spits’ out the strings.

Then when i found where the strings are ‘spat’ out… i would do a search and see if the string contains “Sehr geehrter Herr xxx” for male and “Sehr geehrte Frau xxx” for female.

If it contains those strings…then i would make the IF statement act how it should act according to the German language structure.

Hope this helps

tschuss

oh and have fun!!

:slight_smile: