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

    (@chouby)

    Maybe it’s not clear enough in the documentation 🙁
    Just use:

    <?php echo pll_the_languages(array('display_name_as' => 'slug','show_flags'=>'0')); ?>

    Thread Starter Robert Novak

    (@revolter)

    Hi Chouby,

    I tried it before but the result is such that it shows a full word (english) and I want only the first two letters (en), (hr), (fr), (de)… or maybe I have some bug in system…

    Just like this code do – pll_current_language(); – but with switch links

    Plugin Author Chouby

    (@chouby)

    I did not pay attention first. You must use ‘display_names_as’ with a ‘s’. I updated the documentation which I wrote wrong. Sorry.

    Thread Starter Robert Novak

    (@revolter)

    Thanks Chouby,

    it works now!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Polylang] Get locale rather than full language name’ is closed to new replies.