I want to show "Thanks msg" in different languages, depending on site language.
So, i put next code in this action:
but it displays something like this:
getTag(); if ($lang->getTag()=='en-GB'){ echo '
Your request is sent
Thanks, '.$fullname.'. After a while our manager will contact you for specification of details.
'; } elseif ($lang->getTag()=='ru-RU') { echo '
Ваш запрос отправлен
Спасибо, '.$fullname.'. Через некторое время наш менеджер свяжется с вами для уточнения деталей.
'; }?>
So, is there a solution to this problem?
So, i put next code in this action:
<?php
$lang =& JFactory::getLanguage();
echo 'Site language is: '.$lang->getTag();
if ($lang->getTag()=='en-GB'){
echo '<h2>Your request is sent</h2>
<p>Thanks, '.$fullname.'. After a while our manager will contact you for specification of details.</p>';
} elseif ($lang->getTag()=='ru-RU') {
echo '<h2>Ваш запрос отправлен</h2>
<p>Спасибо, '.$fullname.'. Через некторое время наш менеджер свяжется с вами для уточнения деталей.</p>';
}?>
but it displays something like this:
getTag(); if ($lang->getTag()=='en-GB'){ echo '
Your request is sent
Thanks, '.$fullname.'. After a while our manager will contact you for specification of details.
'; } elseif ($lang->getTag()=='ru-RU') { echo '
Ваш запрос отправлен
Спасибо, '.$fullname.'. Через некторое время наш менеджер свяжется с вами для уточнения деталей.
'; }?>
So, is there a solution to this problem?
No, you may use a "Custom code" action instead.
Please note that the whole form output will be translated before its displayed if you have any "Multi language" actions, so you can write the thanks message in English and use the multi language action to translate it, I'm not sure if this is available in V4 Rc2.0, please test it and if it doesn't work then please contact me through the "Contact us" page to get the latest installer.
Regards,
Max
Please note that the whole form output will be translated before its displayed if you have any "Multi language" actions, so you can write the thanks message in English and use the multi language action to translate it, I'm not sure if this is available in V4 Rc2.0, please test it and if it doesn't work then please contact me through the "Contact us" page to get the latest installer.
Regards,
Max
This topic is locked and no more replies can be posted.