jsapoznik
Forum Replies Created
-
Forum: Plugins
In reply to: [Qtranslate Slug] Multilanguage redirect into MenusHi, I came across this post after all day of reaseach on custom link I was able to fix it by creating two menus, one in english (Nav_en) and one in spanish (Nav), which is also selected as default menu, and default language is Spanish. Then on Header.php I added this code:
<?php
if(qtrans_getLanguage()==’en’) // put your code here if the current language code is ‘en’ (English)
{wp_nav_menu( array(‘menu’ => ‘Nav_en’ ));
} elseif(qtrans_getLanguage()==’es’) // put your code here if the current language code is ‘es’ (Español)
{
wp_nav_menu( array(‘menu’ => ‘Nav’ ));
}
?>
Maybe this will work for someone too, Cheers!!Forum: Plugins
In reply to: [xili-language] Language specific navigation menus?Hi!! I was having the same problem, but using qtranslate, I solved it using 2 navigation menus and calling each other with a drop down selection. Maybe you can adapt it to work with xili. Hope it helps!!
<nav id=”-main-menu”>
<?php
if(qtrans_getLanguage()==’en’) {
// put your code here if the current language code is ‘en’ (English)
wp_nav_menu( array(‘menu’ => ‘Nav_en’ ));} elseif(qtrans_getLanguage()==’es’) {
// put your code here if the current language code is ‘id’ (Español)
wp_nav_menu( array(‘menu’ => ‘Nav’ ));}?></nav><div> <?=qtrans_generateLanguageSelectCode(‘dropdown’);?> </div>