Skip to content
Public Ticket #7465

Polylang language switcher

Conversation thread

Penci Design replied

Staff Reply

Hi,

I checked documention of Polylang plugin. I saw  plugin have "pll_current_language" function http://prntscr.com/n28i5f

Please check http://prntscr.com/n28had to know how to get locale of your language 

You can try use with custom code php below:

// slug_lang  either ‘name’ or ‘locale’ or ‘slug’, defaults to ‘slug’
$value = 'en';
if( function_exists( 'pll_current_language' ) && pll_current_language($value) ) {
 // Custom code 
}

Best Regards,

PenciDesign

Igorz16 replied

Customer Reply

Thank you, I wanted to add a php code, because it's a button, I solved by myself putting it in template-parts/header/cart_search_social.php.

Thank you anywhere.

Penci Design replied

Staff Reply

Hi,

Please go to Customize > Addtional CSS then add custom css to do that:

 html[lang="your lang"] .main-navigation{
float: right;
}

Please add your lang you want menu float right. EX: your lang is en.

Best Regards,

PenciDesign

Igorz16 started the conversation

Conversation Start

I'm configuring menu, I put all the objects with float left, but I want the language switcher on the right, next to the social icons (at their left). How can I do? If css doesn't works, where can I insert the code in php? Thank you

Want to join this conversation or access attachments? Sign in first.