shef,
Please take a look at the following screenshots. Everything works as you need. Check carefully the settings of your Email Template, the settings of the Salutation field.
Announcement
Collapse
No announcement yet.
Translate Contact Salutation Name/Title in Email Template
Collapse
X
-
Originally posted by lazovic View PostHi shef,
Try use the following lines:
Code:{{#ifEqual salutationName 'Mr'}}your translation{{/ifEqual}} {{#ifEqual salutationName 'Mrs'}}your translation{{/ifEqual}}
Here it is important to understand why we are using salutationName and not Person.salutationName.
When we select the Parent when forming an email, the attributes from the Email Template are already oriented towards the Parent, that is, as happens when working with the PDF Template, which always focuses on only one Target Entity and uses simple attributes, without preliminary inserts such as Person, User, etc. .
Leave a comment:
-
Hi shef,
Try use the following lines:
Code:{{#ifEqual salutationName 'Mr'}}your translation{{/ifEqual}} {{#ifEqual salutationName 'Mrs'}}your translation{{/ifEqual}}
Here it is important to understand why we are using salutationName and not Person.salutationName.
When we select the Parent when forming an email, the attributes from the Email Template are already oriented towards the Parent, that is, as happens when working with the PDF Template, which always focuses on only one Target Entity and uses simple attributes, without preliminary inserts such as Person, User, etc. .
Leave a comment:
-
Originally posted by shalmaxb View PostIt works in email template this way (without formula):
{{#ifEqual Person.salutationName Mr.}}your translation{{/ifEqual}}
{{#ifEqual Person.salutationName Mrs.}}your translation{{/ifEqual}}
I also tried with these:
Code:{{#ifEqual Person.salutationName 'Mr.'}}your translation{{/ifEqual}} {{#ifEqual Person.salutationName 'Mrs.'}}your translation{{/ifEqual}}
Code:{{#ifEqual Person.salutationName 'Mr'}}your translation{{/ifEqual}} {{#ifEqual Person.salutationName 'Mrs'}}your translation{{/ifEqual}}
It doesn't work either. It does not output anything when the template is loaded.
I also tried to match without the dot:
Code:{{#ifEqual Person.salutationName Mr}}your translation{{/ifEqual}} {{#ifEqual Person.salutationName Mrs}}your translation{{/ifEqual}}
However, while this solution might be a quick workaround, it is bound to fail. It assumes the language for the current user interface is set to English. If the current user interface will be set to another language, the ifEqual will not match. The absolute correct way to achieve this would be to output the choice of the salutation option according to the translation on the specific language.1 PhotoLast edited by shef; 04-03-2023, 12:58 PM.
Leave a comment:
-
It works in email template this way (without formula):
{{#ifEqual Person.salutationName Mr.}}your translation{{/ifEqual}}
{{#ifEqual Person.salutationName Mrs.}}your translation{{/ifEqual}}
Leave a comment:
-
Originally posted by shalmaxb View PostYou could achieve this by formula, but from your question it is not quite clear, if you have anything written in the salutatioName-field. A formula would depend on this. And there might be more than one solution depending on how it works in the moment.
You can reproduce this if you create an email template and in there try to have the salutationName translated into another specific language, which is different from the language of the interface you are on.
I have attached two screenshots which show where I am trying to apply this translation and where it will be used.2 Photos
Leave a comment:
-
You could achieve this by formula, but from your question it is not quite clear, if you have anything written in the salutatioName-field. A formula would depend on this. And there might be more than one solution depending on how it works in the moment.
Leave a comment:
-
Translate Contact Salutation Name/Title in Email Template
Hello,
I would like to translate the salutation name/title within an email template for Contact.
I have tried these, but they don't work.
Code:{{translate Person.salutationName field='salutationName' scope='Contact' language='en_UK'}} {{translateOption Person.salutationName field='salutationName' scope='Contact' language='en_UK'}}
Hello Mr. John Smith
Does anyone have any idea how to achieve this?
Thanks.
Leave a comment: