I posted this before but I never received an answer. So I repost in the hope that somebody has a solution for me.
My site has members from different countries… read -> different languages.
I thus wanted to customize the New User Email Message to display in the language of the user. I tried this:
<?php
$lang = get_user_field("_taal_")
if ($lang=="NL")
{
$msg("Hallo %%user_first_name%%," .
,"", .
"Bedankt voor je inschrijving bij Reiki magazine Online", .
"Dit is je gebruikersinformatie:", .
"Gebruikersnaam: %%user_login%%", .
"Password: %%user_pass%%", .
"Geregistreerd emailadres: %%user_email%%", .
"Je kan inloggen op de startpagina rechtsboven.", .
"Ik hoop het uiteraard niet, maar mocht je ooit je abonnement willen opzeggen dan doe je dat nadat je ingelogd bent.", .
"Ga naar je profiel pagina. Daar kom je door eerst in te loggen en dan te kiezen voor "Edit my profile"", .
"Onderaan staat een knop 'Unsubscribe'", .
"Klik daarop. Hiermee worden automatische vervolgbetalingen stopgezet. Je abonnement wordt stopgezet nadat je huidige abonnementsperiode is verlopen." );
}
if($lang=="EN")
{
$msg("Hello %%user_first_name%%,", .
"Thank you for subscribing to Reiki Magazine Online.", .
"", .
"Your Username/Password:", .
"Username: %%user_login%%", .
"Password: %%user_pass%%", .
"", .
"You can log in at the homepage (right upper corner).", .
"In case you might want to stop your subscription at some time in future you can do so once you are logged in.", .
"The membership login box at the top-right corner changes from membership login to "My Profile Summary" Click on "Edit my profile".", .
"At the bottom of the page you see a button "unsubscribe". Click on that to unsubscribe from Reiki Magazine Online.", .
"Any recurring payments will stop and your subscription will expire after the current timeslot of you subscription.");
}
$arrlength=count($msg);
$bericht = ""
for($x=0;$x<$arrlength;$x++)
{
$bericht = $bericht + $msg[$x] + "<br>";
}
echo $bericht
?>
This is not working at all. I get the full php code in the message.
So the question is, is there a way to create a message depending on the language of the new user?
FYI, I do have a custom field “_taal_” that displays the language of choice.
For now I stick to repeating the message in 3 different languages. (Dutch, German, English) in one mail.