Polylang is a very popular free plugin and used for Multilingual set up in WordPress based websites. Polylang plugin has built-in compatibility with Avada Theme. Its definitely possible to display the Language Switcher in Main Navigation and Top Menu locations. But at the moment, its not possible to display it along with the other content of Top Header like Social Media or Contact Info with the provided options of Theme. Many people want to display the Language Switcher in the Top Header without using the Navigation either side of the Top Header since it offers two content area, one of the right and second on the left.

Below is the process on how you can add the language switcher in top header while keep showing selected Header Content 1 and Header Content 2 Avada theme offers:

1. You need to install a Child Theme and create a directory folder with the name of ‘templates‘ and copy the header-secondary.php file from the Parent theme to this templates folder of Avada Child theme. This has to be done via your FTP or File Manager of your website hosting.

Polylang Language Switcher

2. Now edit this file in a Text-Editor and put the below code any where between the DIV HTML tag of either fusion-alignleft OR fusion-alignright CSS Class.

<?php pll_the_languages(array(‘show_flags’=>1,’show_names’=>0)); ?>

Avada Header

 

3. Save changes and the Flags of your defined languages of Polylang plugin will appear in the Top Header location as per your pasted code. Now a little styling will be required to make it well looking so the below CSS can be used in the style.css of your Child Theme. Once done, your flags will appear horizontally.

.lang-item {
    list-style: none;
}
.lang-item {
    display: inline;
}
li.lang-item > a > img {
    margin: 12px !important;
    margin-top: 17px !important;
}

Now for readers convenience :-) I have created a specific Child Theme for this purpose which saves you the Step #1 and #3 and it can be downloaded from here. All you need to do is to install the Avada Child Theme and then go to Dashboard -> Appearance -> Editor section and put the PHP code of step #2 in the mentioned file and bingo.