In my template I call the newsmodule as follows:
{news category="Partners-$lang" summarytemplate="Partners" sortasc="true" }
Not all my languages have translations of the news articles.
How can I show the news articles in the default language when there is no translation in that language ?
I was thinking about the following UDT:
Code: Select all
global $gCms;
$smarty =& $gCms->GetSmarty();
$lang = $smarty->get_template_vars('lang');
if ($lang == 'nl_NL'){
echo 'nl_NL';
} elseif ($lang == 'en_US') {
echo 'en_US';
} else {
echo 'en_US';
}
{news category="Partners-$lang" summarytemplate="Partners" sortasc="true" }
?