This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation
<div id="languageSelect">
    $block = Block::getByName('Language Select');  
    if( is_object($block) ) $block->display();  

Originally posted by pvernaglia at


Language Switching is our method for building web sites in multiple languages. We do a lot of sites in multiple languages and have our own twist on language switching.  It's not a lot different than you will see many other people recommending.  It is easy to install and easy for clients to maintain.

Choose a Default Language

Decide your default language. In this example it is English.  The default Home page in the site will be the English Home page. You can call it whatever you want and put whatever pages you want beneath it.

Choose An Alternate Language

Our second language will be Spanish. Create a page under Home called 'ES' and check the attribute box for Exclude from Nav. This page is a holder for all Spanish pages.

Create a Spanish Menus Page Attribute

Go to Dashboard - Pages and Themes - Attributes and add a new CheckBox Attribute.


Click the Page Types tab and edit your page types to include Spanish Menus as a default Attribute.

Go to Dashboard - Scrapbook and create a new Scrapbook called Language Menus.  

Add a Language Selector, English Auto-Nav and Spanish Auto-Nav Blocks to the Global Scrapbook:

Language Selection (Content Block)


We use a list for this and style it either horizontal or vertical with links to the home page for English and to es/inicio for Spanish.  You can use a list or just links, if you don't want to put this in a Scrapbook you can code it into your pages.

English Menus (Auto-Nav)


Spanish Menus (Auto-Nav)


Create Spanish Pages

Now create pages under ES, including a home page (Inicio) and as you add them add the Spanish Menus Attribute to each page.


Embed the Menus

Edit your page files that contain your navigation areas (probably [your_theme]/elements/header.php.  You will see a div like this:

<div id="headerNav">
  $a = new Area('Header Nav');

Replace it with:

<div id="headerNav">
    if ($c->getCollectionAttributeValue('spanish_menus')) {
      $block = Block::getByName('Spanish Menus');  
      if( is_object($block) ) $block->display();  
    } else {  
      $block = Block::getByName('English Menus');  
      if( is_object($block) ) $block->display();        

Now any page that has the "Spanish Menus" attribute set will display menus in Spanish, others will display in English.

Decide where you want your Language Selection menu to go and add this div to the page:

You can style that div as you need.

So there you have it, you can see this working at

Loading Conversation