Internationalization Add-on - Put "Switch Language Block" into theme

Permalink
hi

I installed the Internationalization Add-on and everything works fine.
But I would like to add the "Switch Language Block" into my theme, similar to the autonav block you can directly write into your theme's template files.
Is this possible?

Thanks,
poetze

poetze
 
pieterbeulens replied on at Permalink Reply
Hi Poetze,

You can use the following code in your template where you want the internationalization option to appear:
<?php
  $bt_main = BlockType::getByHandle('switch_language');
  $bt_main->render('view');
?>

This will show up as a select box. If you want the flags, then change the second line to
$bt_main->render('templates/flags/view');
abra100pro replied on at Permalink Reply
abra100pro
Great, thanks Pieter! Could use it, today.