
Title = English (in both language tabs! - this is important as your visitor should always see his language item. Title = Deutsch (in both language tabs! - this is important as your visitor should always see his language item. Name = default (this can't be changed and is read only) Now you can add the previously created field languagecode to the language template.Įdit your languages and fill in the appropriate values. To achieve this, go to Setup / Templates and activate the filter Show system templates : Here is an overview for ISO 639-1 two-letter language codes:Īdd this field to the system template: language.
Language switcher css code#
Without this field, you will need to programmatically construct your two-letter language code output via PHP (at least for the default language, as ProcessWire doesn't allow to rename the default language and it will always be called default). The field is needed to provide a simple method for outputting the language code in your templates. This will hold the ISO 639-1 two-letter language code for the respective language. In my case it's German (default language) + English: Setup at least 2 languages in your PW install.

TUTORIAL - Set up a nice language switcher for your website - here we go:

There are some threads here in the forum (and from external sources) where this question is all others for your hints! I rewrote this tutorial since I was made aware and learned that flags should not be used for language selectors! I'm very new to ProcessWire but already fell in love with this CMS/CMF! I just finished my first small project and as I saw a lot of questions and different answers in this forum on how to set up a nice language switcher for your website, I decided to write my first tutorial.
