%%[ Set @language = System_Language__c Set @ESvalue= "es_" Set @PTvalue= "pt_" Set @FRvalue= "fr_" Set @JPvalue= "ja_" Set @ITvalue= "it_" Set @RUvalue= "ru_" Set @DEvalue= "de_" Set @ENvalue= "en_" /* Does it match; ; if no match, output of IndexOf(1,2) will be "0" */ SET @firstName = AttributeValue("FirstName") SET @UNvalue= "?" SET @firstName = ProperCase(@firstName) IF @firstName == "unknown" OR IndexOf(@firstName,@UNvalue) > 0 then set @FirstName = "" ENDIF if @language == "Spanish" OR IndexOf(@language,@ESvalue) > 0 then IF NOT EMPTY(@firstName) then set @greeting = Concat(@firstName, ", h") ELSE SET @greeting = "H" ENDIF elseif @language == "Portuguese" OR IndexOf(@language,@PTvalue) > 0 then IF NOT EMPTY(@firstName) then set @greeting = Concat(@firstName, ", n") ELSE SET @greeting = "N" ENDIF elseif @language == "French" OR IndexOf(@language,@FRvalue) > 0 then IF NOT EMPTY(@firstName) then set @greeting = Concat(@firstName, ", n") ELSE SET @greeting = "N" ENDIF elseif @language == "Japanese" OR IndexOf(@language,@JPvalue) > 0 then IF NOT EMPTY(@firstName) then set @greeting = Concat(@firstName, ", V") ELSE SET @greeting = "V" ENDIF elseif @language == "Italian" OR IndexOf(@language,@ITvalue) > 0 then IF NOT EMPTY(@firstName) then set @greeting = Concat(@firstName, ", a") ELSE SET @greeting = "A" ENDIF elseif @language == "Russian" OR IndexOf(@language,@RUvalue) > 0 then IF NOT EMPTY(@firstName) then set @greeting = Concat(@firstName, ", м") ELSE SET @greeting = "М" ENDIF elseif @language == "German" OR IndexOf(@language,@DEvalue) > 0 then IF NOT EMPTY(@firstName) then set @greeting = Concat(@firstName, ", w") ELSE SET @greeting = "W" ENDIF else IF NOT EMPTY(@firstName) then set @greeting = Concat(@firstName, ", w") ELSE SET @greeting = "W" ENDIF endif]%%
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter