embed Multilingual navigation

Permalink
hello, i'm working on demo site with concrete5 last version 5.7

was working on the multilingual part with this documentation ( old doc for 5.6)
http://www.concrete5.org/documentation/how-tos/editors/building-sit...

everything is working great :) except the integration code , i'm not really sure how to do it for 5.7

for 5.6 this is
Edit your page files that contain your navigation areas (probably [your_theme]/elements/header.php.  You will see a div like this:
display($c); ?>
Replace it with:
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:
display(); ?>
You can style that div as you need.


here is the header.php for theme elementary _ concrete5.7 :
Please help me for this part
how to insert /change navigation spanish <-> english ?
<?php defined('C5_EXECUTE') or die("Access Denied.");
$this->inc('elements/header_top.php');
$as = new GlobalArea('Header Search');
$blocks = $as->getTotalBlocksInArea();
$displayThirdColumn = $blocks > 0 || $c->isEditMode();
?>
<header>
    <div class="container">
        <div class="row">
            <div class="col-sm-4 col-xs-6">
                <?php
                $a = new GlobalArea('Header Site Title');
                $a->display();
                ?>
            </div>

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi dunham,

Concrete5 5.7 currently does not support multi-language features.

Multi-language features are coming in the 5.7.3 release.
dunham replied on at Permalink Reply
i tried this :

$a = new GlobalArea('Header Navigation');
//$a->display();

$vallangue = $c->getCollectionAttributeValue('French_menu');
if (!$vallangue)
{
$block = Block::getByName('French_menu');
if( is_object($block) )
{//$block->display();
}
else {
$a->display();
}

should works but ive got this error "Class helper/concrete/scrapbook does not exist" (error on line : $block = Block::getByName('French_menu'); )
i was thinking scrapbook was removed from 5.7 ?!

so i need to rephrase the question :

as French_menu Spanish_menu etc ... are pages attributes :

How to find if this attribute is false or true from the php code ?? ( that will reply to the question )