Language specific global areas

Submitted by abra100pro - 3 years ago

***You must have the internationalization add-on installed *** So you have a global area. It should contain gobal stuff. But this content should be different, language specific. Use the code below. You'll get a separate, though global area for each language of your site. For the editor, it'll look like this: in the english part of the site: Add to NameOfArea en_GB, in the french part: Add to NameOfArea fr_FR, in the german part: Add to NameOfArea de_DE ...

<?php
$lh = Loader::helper('section', 'multilingual'); 
$currentlang = $lh->getLanguage(); // de_DE, fr_FR, en_US, en_GB, Handling via Multilingual add-on...
$b = new GlobalArea('NameOfArea ' . $currentlang); 
$b->display($c);
?>
Stats Categories Tags
comments powered by Disqus