How make a dropdown languages menu
-
Hi. First, thank you very much for this awesome project. I am new here and I am creating my first WordPress template. I have the static drop-down menu (I used Semantic UI framework) and works right and now I’m going to Polylang languages menu.
<div class="language"> <div class="ui dropdown item"> <i class="inverted large world icon"></i>Language<i class="inverted dropdown icon"></i> <div class="menu"> <a class="item">Español</a> <a class="item">English</a> <a class="item">Français</a> </div> </div> </div>
[url=http://subefotos.com/ver/?1a58bf470e65279015116693422d043bo.png][img]http://thumbs.subefotos.com/1a58bf470e65279015116693422d043bo.jpg[/img][/url]
Can you help me?
Thanks in advance.
-
You can use the polylang function
pll_the_languages(array('raw'=> true))
This function will give you array that has all the information for you to build your custom menu.
Great hendrah. Thanks to your information I searched how to implement the code but I am not experienced developer and do not know how it works.
Now I understand how to use and configure the code but not that function and Javascript I have to apply in functions.php for the dropdown works. Here the information I have found if it helps others.
Solutions to other user but when I implement my WordPress gives me an error:
[resolved] dropdown menu not working
[resolved] Dropdown flag
[resolved] Help with Drop-down actionOfficial information and tutorial:
The language switcher (Official Polylang blog)
Function reference (official Polylang documentation)
Multilingual WordPress Websites with Polylang (Sitepoint tutorial)As I have little time to finish the project I will study this later. For now I will use a dropdown menu of Semantic UI set to go to the Home of each language.
Thanks
Hi!
The dropdown language switcher in menu will be a new feature of Polylang 2.0 (for themes having dropdown menus). You can test the current development version available on github if you like to.
Hi Chouby. That is great news!
Thank you very much for the hard work and sharing this great tool.
- The topic ‘How make a dropdown languages menu’ is closed to new replies.