Basic locale switcher

This commit is contained in:
Pierre Rudloff 2017-05-30 22:20:16 +02:00
parent e64bb9b9f5
commit b4dd0aeb29
7 changed files with 135 additions and 10 deletions

View file

@ -1,6 +1,6 @@
{locale path="../i18n" domain="Alltube"}
<!Doctype HTML>
<html lang="en">
<html lang="{$locale|replace:'_':'-'}">
<head>
<meta charset="UTF-8" />
<meta name=viewport content="width=device-width, initial-scale=1">

View file

@ -4,5 +4,12 @@
{t}Share on Twitter{/t}<div class="twittermask"></div></a>
<a class="facebook" href="https://www.facebook.com/sharer/sharer.php?u={base_url|urlencode}" target="_blank">{t}Share on Facebook{/t}<div class="facebookmask"></div></a>
</div>
<ul class="locales">
{if isset($locales)}
{foreach $locales as $locale=>$name}
<li><a href="{path_for name='locale' data=['locale'=>$locale]}">{$name}</a></li>
{/foreach}
{/if}
</ul>
</header>
<div class="wrapper">