WordPress.org

Support

Support » Plugins and Hacks » Polylang » [Resolved] Multiple flags for the same language

[Resolved] Multiple flags for the same language

  • First of all, your work is remarkable and extremely useful. Thanks you for all your efforts!!

    I was wondering if there was (or will be) a way allowing to setup several variations of a flag for a given language. For example for the following scenarii, in a wordpress Multisite using four languages:
    – making the active language flag more prominent by its style and appearance
    – using the flag style or shape that is best suited to the specific blog look and feel within that MS environment.

    Is it something that would be feasible?

    http://wordpress.org/extend/plugins/polylang/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chouby

    @chouby

    Do the custom flags cover your needs?
    The language switcher

    Thanks for your prompt reply.

    I have already read the doc and made full use of the custom flags. I am sorry that I was not any clearer in my request. But I would like to know if it possible to customize even more the custom flags, as far as I understand the naming convention for the flag is restricted.

    The issue is that I want two shapes of flags:
    the active language flag needs to have a shape different from the inactive ones. In other words I am trying to get at the same time
    active_en_US and en_US flags, active_fr_FR and fr_FR flags an so on This was my first bullet.
    And then because I have several themes and designs in MU, I am trying to get as well active_cooking_en_US, cooking_en_US, active_tourism_en_US, tourism_en_US……

    Any thoughts on how to customize flags name?

    Plugin Author Chouby

    @chouby

    To do such thing, you will have to code your own language switcher. If you are a php programmer, it should not be too difficult. In that case, to help you starting, here is how to get the translations of the current page:

    global $polylang;
    foreach ($polylang->get_languages_list() as $lang) {
    	// use $lang->name to get the language name
    	// use $lang->slug to get the language code
    	$url = $polylang->get_translation_url($lang);
    	// $url === null if there is no translation available
    }

    Thanks for the tip, I will give it a try.
    I am not a programmer by trade but I get the hang of what needs to be done.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Multiple flags for the same language’ is closed to new replies.
Skip to toolbar