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.
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.
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.
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.
Thank you :-)
Any way to display the flags on either side of the logo in secondary main menu?
This requires code customization and there is a hook available in Avada theme to add your content before or after logo area. You can check out the documentation here.
Cool read! I want to add two language switcher flags on either side of my logo in the main secondary menu. Any way to do that?
It would be possible by using the Language Switcher in the Top Menu Navigation but that would require you to set Navigation for Header Content 1 OR 2 which is currently Contact info and social links right now. Having all 3 of them at once is not possible.
Hello, thanks for the article. I have a very big problem -maybe You will be able to help me. I use an Avada adventure theme and there is a floyout menu. In right up corner there is PLUS icon for slides widget and MENU icon. Is there an any possibility to add a lenguage switcher or only the icon of the language EN, DE in the same line as PLUS and menu icon?