Compatibility:

WebSite X5 Evo and Pro


Header and footer are two perfect sections on a page to show the commands for the language choice for the website. By working on header and footer instead of using an Entry page (see: How to set up the commands for the language choice on an Entry Page), your visitors will be able to change the language they are using at any time, and from any page in the website.


If you want to find out how to set up the commands for the language choice on the website header, watch this video or keep reading:


 

To make things clearer, let's go back to the example mentioned on How to create a multi-language website  taking all what's reported on that article about how to set up projects in English, German and Portuguese for granted.  

  • Open the English website project.
  • Go to Step 2 - Template Settings and click on the Template Content button.
  • Choose if you want to work on the Header or the Footer, then use the Text Object to report EN | DE | PT.
  • Now let's move on to the links: open the text editor, click on the button and select the File or URL option in the Link window. Activate the option URL and type in the Homepage URL for each project in the different languages.

When you set up the links you need to consider that:

  • you don't have to set anything on EN, as it is the project you are working on;
  • on DE you need to set the link by writing /de in the URL field;
  • on PT you need to set the link by writing /pt  in the URL field.


You will need to report the buttons for the language choice on the German and Portuguese projects as well.

  • Open the German project and repeat the mentioned procedure to recreate the same buttons. Set the links on EN and PT. 
  • Similarly, open the Portuguese project and recreate the same buttons by reporting the links on EN and DE.


Now your website is ready for the language choice: you simply need to publish all the 3 projects for the different languages online by following the same logic used to set the links (see: How to publish projects for a multi-language website).


#tip - Alternatives. In our example, we used the Text Object to create buttons reporting hypertext links. Alternatively, you can create the same buttons using the images of flags of the different countries. For this, you can use the Image Object or the Hover Button and Animated Button Optional Objects. Finally, you can report the list of the available languages in a drop-down menu using the dedicated Language Choice Object (see: Language Choice Object. How to create a menu for the language selection).