• Is it (easily) possible to add the flags to the dropdown language selector (widget)?
    The desired version is a language switcher dropdown that displays the language name(s) and the flag(s).
    Is this controlled by the plugin or by the css of the theme?
    Where would I have to start/take a look at to get that?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Unfortunately the Html language does not support pictures in dropdown lists. So the only way to do this is to use a script which will mimic the dropdown list. The problem is that it is impossible to make something which integrates well with the design as native html dropdown lists are normally designed by the browser according to the user theme (which of course you cannot control). That’s why I did not (and most likely will not) integrate such feature to Polylang.

    Google “dropdown image” or something similar and you will find plenty of scripts that can do what you want. Then you will probably have to modify the code into Polylang to integrate your dropdown list.

    Thread Starter blablubb

    (@blablubb)

    Thanks for the quick reply. Where exactly in the code do you create/set the dropdown list? I looked into the widget code and found the handling of the dropbox, but where do I find the actual code of the HTML component? (Sorry, am not so familiar with php (yet…), so maybe the questions seems stupid).

    In version v6.1, the dropdown list is generated in the file include/core.php lines 672 to 679 and line 704.

    Thread Starter blablubb

    (@blablubb)

    Perfect, thanks ??

    Is there currently any plugin or similar that can be used in combination with Polylang to provide the functionality of a drop-down menu with flags for selection of a language ?

    Polylang is quite a new plugin so, as far as I know, no extension has been written yet.

    I included a modification in the code in the development version to allow someone else to do this without modifying the Polylang code.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Polylang] Flags in dropdown list’ is closed to new replies.