I need to add php code in a Joomla backend file to display different link depending to the selected language.
I need to display link1 if language selected is english, while link2 if language selected is german
I'm using this php code, but I not understand the error:
<?php
$menu = JSite::getMenu();
if ($menu->getActive() == $menu->getDefault( 'en-GB' ))
{
<li>
<a href="link1" class="btn btn-primary">
<?php echo JText::_('OSM_ALTERNATIVE'); ?>
</a>
</li>
}
else
{
<li>
<a href="link2" class="btn btn-primary">
<?php echo JText::_('OSM_ALTERNATIVE'); ?>
</a>
</li>
}
?>
Can you help me?