flag_es.jpg flag_en.jpg flag_de.jpg

This site is an example of the pages needed to create a site with pages in different languages and flag buttons to switch to the same page in another language. It uses just Spanish, German and English but the method is the same however many languages are used.

The permissions have been relaxed so you can create and edit pages, but please do not change the pages listed below as they are required to make the site work.

If you edit the pages below or view the page source you will see some notes to help you.

Make sure you set your default start page (in _admin > general settings > advanced settings) to the main language. On this example site it is set to en:start.


Link Page Description
flags flags Page containing the flag images, the css module for placing them and the table to display them and link between pages
_template es:_template live template for the spanish category
_template en:_template live template for the english category
_template de:_template live template for the german category
start es:start start page for the spanish category
start en:start start page for the english category
start de:start start page for the german category
es nav:es top navigation bar for the spanish category
en nav:en top navigation bar for the english category
de nav:de top navigation bar for the german category
google es:google example content page in Spanish
google en:google example content page in English
google de:google example content page in German
theme css:theme custom theme for the site (not required). The notes when you edit the page explain how to add a different background image for each language if you wish to

Content pages in each language must have the same name or the flags won't work. In this example the pages are:

es:start <-> en:start <-> de:start
es:google <-> en:google <-> de:google

If you have different names (for example en:start <-> es:inicio) then clicking on the flags won't take you to the equivalent page in the other language. This is because the link for the flags uses es:%%name% and en:%%name%% and de:%%name%% so it is looking for the page with the same name in the other language.

The language categories can be autonumbered but here again the page names must be the same.

The flags will always positioned at the top of the page content section, with that position adjusted using the code in the css module on the flags page. You cannot put the flags into the header section.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License