Newbies in PHP.....
With 3 languages it was necessary to choose with an if coding
Following code in layout/default.php is working properly.
<div class="gkMainMenuWrap gkMainMenuLeft">
<?php if($this->API->get('menu_type', 'off-canvas') === 'classic') : ?>
<?php
$lang = JFactory::getLanguage()->getTag();
if ($lang === "fr-FR") {
$menuNameLeft = 'mainmenu-left-fr';
} elseif ($lang === "en-GB") {
$menuNameLeft = 'mainmenu-left-en';
} else {
$menuNameLeft = 'mainmenu-left-sp';
}
$this->mainmenu->loadMenu($this->API->get('menuname', $menuNameLeft));
$this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
?>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="gkLogoWrap">
<?php $this->layout->loadBlock('logo'); ?>
</div>
<?php if($this->API->get('show_menu', 1) || $this->API->modules('search')) : ?>
<div class="gkMainMenuWrap gkMainMenuRight">
<?php if($this->API->get('show_menu', 1) && $this->API->get('menu_type', 'off-canvas') === 'classic') : ?>
<?php
$lang = JFactory::getLanguage()->getTag();
if ($lang === "fr-FR") {
$menuNameRight = 'mainmenu-right-fr';
} elseif ($lang === "en-GB") {
$menuNameRight = 'mainmenu-right-en';
} else {
$menuNameRight = 'mainmenu-right-sp';
}
$this->mainmenu->loadMenu($this->API->get('menuname', $menuNameRight));
$this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
?>
<?php endif; ?>