Change Language of Menu and footer
-
Hi ,
I have been trying to change the language of the menu itself to Chinese. I search on the net and found recommendations like these.
if ( qtrans_getLanguage() == ‘en’ ) {
wp_nav_menu( array(‘menu’ => ‘Menu 1 en’, ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘nav-menu’) );
}
if ( qtrans_getLanguage() == ‘id’ ) {
wp_nav_menu( array(‘menu’ => ‘Menu 2 id’, ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘nav-menu’) );
}.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~So I tried to customized to my own header file :
if ( qtrans_getLanguage() == ‘en’ ) {
wp_nav_menu( array( ‘theme_location’ => ‘primary’ ));
}It doesn’t work as my front page does not display.
Also if i remove the if ( qtrans_getLanguage() == ‘en’ ) and leave it to normal
<? php wp_nav_menu( array( ‘theme_location’ => ‘primary’ )); ?>
It works.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So I am wondering if there is this qtrans_getLanguage() in the plugin or function file and where can I find it?
Or could anyone one let me know how did they successfully change the language for menu and footer using the qTranslate X version.
Thank you.
- The topic ‘Change Language of Menu and footer’ is closed to new replies.