1

Here is my script:

%%[IF[Language] == "FR"  AND [Gender] == "F" THEN]%%
    Chère 
%%[ELSE]%%
    Cher 
%%[ELSEIF[Language] == "NL"  THEN]%%
    Beste 
%%[ELSE]%%
    Beste 
%%[ENDIF]%% 

%%FirstName%% %%LastName%%,
%%=UpperCase([Language])=%%, 
%%=LowerCase([Gender])=%%
%%=UpperCase([EmailAddress])=%%

In Belgium we're bilingual French and Dutch and need to display the salutations accordingly.

3
  • Hi @user45515, welcome to SFSE! for future reference, avoid including salutations and any mentions of being a beginner. A clear description of the Issue in the post would also be appreciated, not only mentioning that there is an issue. Take some time to view How to Ask and take the tour. Thank!
    – glls
    Commented May 30, 2017 at 11:27
  • Thank you for the kind welcome to a beginner. I'll indeed take the tour to see how to ask questions to the community. Best rgds Jean-Luc
    – user45515
    Commented May 30, 2017 at 11:53
  • Also, make sure you accept an answer if it helped resolve the issue you are facing, looking forward for more questions and participation on SFSE on you part, cheers!
    – glls
    Commented May 30, 2017 at 11:57

2 Answers 2

0

From your code, it seems like you are only checking for French gender, and the same salutation is used for Dutch. In that case you could try this:

    %%[

        IF([Language] == "FR"  AND [Gender] == "F") THEN]%%Chère 


%%[ELSEIF ([Language] == "FR" AND [Gender] != "F") THEN]%%Cher 
    %%[ELSEIF ([Language] == "NL"  [Gender] == "F") THEN]%%Beste
    %%[ENDIF]%% 
    %%FirstName%% %%LastName%%,
    %%=UpperCase([Language])=%%, 
    %%=LowerCase([Gender])=%%
    %%=UpperCase([EmailAddress])=%%

OR

    %%[IF([Language] == "FR"  AND [Gender] == "F") THEN]%%Chère 
    %%[ELSEIF ([Language] == "FR" AND [Gender] != "F") THEN]%%Cher 
    %%[ELSE]%%Beste
    %%[ENDIF]%% 
    %%FirstName%% %%LastName%%,
    %%=UpperCase([Language])=%%, 
    %%=LowerCase([Gender])=%%
    %%=UpperCase([EmailAddress])=%%
8
  • Thanks for the answers clarifying the use of ELSEIF. I prefer your second one. Best regards Jean-Luc
    – user45515
    Commented May 30, 2017 at 11:57
  • Sorry Data_Kid but I'm in trouble as the following script doesn't work properly: %%[IF[Language] == "FR" AND [Gender] == "F" THEN]%%Chère %%[ELSEIF [Language] == "FR" AND [Gender] == "M" THEN]%%Cher %%[ELSEIF[Language]=="NL" THEN]%%Beste %%[ENDIF]%% %%FirstName%% %%LastName%%, %%=ProperCase([Language])=%%, %%=UpperCase([Gender])=%% %%=LowerCase([EmailAddress])=%%
    – user45515
    Commented May 31, 2017 at 7:21
  • what error are you getting?
    – 0xsegfault
    Commented May 31, 2017 at 7:22
  • Indeed the FR/F get Cher and not Chère!?! Thanks already for your help. Rgds Jean-Luc
    – user45515
    Commented May 31, 2017 at 7:24
  • does it work for beste?
    – 0xsegfault
    Commented May 31, 2017 at 7:33
0

@Data_Kid's answer is correct. I don't speak Dutch, but there's potentially a nuance with French with whether you know the gender, but do not know the customer's first name. This may not be useful if your FirstName field is always populated...

<!--
%%[
    VAR @salutation, @firstname

    IF EMPTY(Language) THEN
        SET @salutation = 'Beste'
    ELSEIF Language == 'FR' AND Gender == "F" THEN
        SET @salutation = 'Chère'
    ELSEIF Language == 'FR' THEN
        SET @salutation = 'Cher'
    ELSE
        SET @salutation = 'Beste'
    ENDIF

    IF EMPTY(FirstName) THEN
        IF Language == "FR" AND Gender == "F" THEN
            SET @firstname = 'Cliente'
        ELSEIF @language == 'FR' THEN
            SET @firstname = 'Client'
        ELSE
            SET @firstname = 'Klant'
        ENDIF
    ELSE
        SET @firstname = FirstName
    ENDIF
]%%
-->
%%=v(@salutation)=%% %%=v(@firstname)=%%,
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .