最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - Gtranslate function with custom menu

programmeradmin2浏览0评论

I am very newbie with WordPress and editing plugins.

I have a 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.

<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>

I am very newbie with WordPress and editing plugins.

I have a 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.

<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>
Share Improve this question edited Dec 5, 2018 at 22:48 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Dec 4, 2018 at 4:11 Luqman305Luqman305 11 silver badge2 bronze badges 2
  • You using some plugin for this or code? – dado Commented Dec 4, 2018 at 6:32
  • hi. yes.i am using gtranslate plugin. the plugin widget works fine, but i try to implement their function inside my own custom design html <li> tag. – Luqman305 Commented Dec 4, 2018 at 7:08
Add a comment  | 

1 Answer 1

Reset to default 0

Link menu item with URL = #, Link Text = Global and add CSS Classes = gtranslate-parent to the newly created menu item. After that you can configure GTranslate and set Widget look = (Flags with language name/Flags with language code/Language names/Language codes) and it will appear as a dropdown when you hover on the newly created menu item.

发布评论

评论列表(0)

  1. 暂无评论