Skip to content

Instantly share code, notes, and snippets.

@stchr
Created September 25, 2012 14:32
Show Gist options
  • Save stchr/3782285 to your computer and use it in GitHub Desktop.
Save stchr/3782285 to your computer and use it in GitHub Desktop.
Language Switch for Kirby
<?php foreach (c::get('lang.available') as $lang): ?>
<a<?php if($lang == c::get('lang.current')) echo ' class="active"' ?> href="<?php echo url($page->uid(), $lang) ?>">
<img src="<?php echo url('assets/images/flags/' . $lang . '.png') ?>" alt="" /><?php echo $lang ?>
</a>
<?php endforeach ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment