Custom menu with gtranslate function

Popular automatic website translation tool

Custom menu with gtranslate function

Postby luqman305 » Tue Dec 04, 2018 7:14 am

HI.
I am very newbie with wordpress and editing plugins.

I have custom menu (English, Chinese (Simplified)) using html that I want it to call the gtranslate function for each language but it seems like it does not working. I dont know how to run the gtranslate with my custom menu.please help.

HTML codes:
Code: Select all
<li class="li-eng"><i class="sl-flag flag-usa"><div id="usa"></div></i> <span class="active"><?php _e('English', 'gtranslate'); ?></span></li>
<li class="li-zh"><i class="sl-flag flag-de"><div id="chinese"></div></i> <span><?php _e('Chinese (Simplified)', 'gtranslate'); ?></span></li>
luqman305
 
Posts: 1
Joined: Tue Dec 04, 2018 7:08 am

Re: Custom menu with gtranslate function

Postby Yana » Tue Dec 04, 2018 10:41 pm

Hi,
If you wish to add GTranslate in menu you can also use Shortcode in Menus plugin with [gtranslate] shortcode.

Install Shortcode in Menus plugin from Wordpress repository (Plugins → Add new and search for Shortcode in Menus)
Go to Appearance → Menus and on the left part you will see Shortcodes
Put [gtranslate] shortcode in it and add to menu
Set Show in menu option to None in GTranslate settings page
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4512
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Google [Bot] and 1 guest

2GLux
cron