forked from Rudloff/alltube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.tpl
30 lines (30 loc) · 1.29 KB
/
header.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<header>
{if isset($supportedLocales) AND count($supportedLocales) > 1}
<div class="locales small-font">
<button class="localesBtn small-font" title="{t}Switch language{/t}">
{if isset($locale) AND $locale->getCountry()}
{$locale->getCountry()->getEmoji()}
{else}
{t}Set language{/t}
{/if}
</button>
<ul class="supportedLocales">
{foreach $supportedLocales as $supportedLocale}
{if $supportedLocale != $locale}
<li>
<a hreflang="{$supportedLocale->getBcp47()}"
lang="{$supportedLocale->getBcp47()}"
href="{path_for name='locale' data=['locale'=>$supportedLocale->getIso15897()]}">
{if $supportedLocale->getCountry()}
{$supportedLocale->getCountry()->getEmoji()}
{/if}
{$supportedLocale->getFullName()|ucfirst}
</a>
</li>
{/if}
{/foreach}
</ul>
</div>
{/if}
</header>
<div class="wrapper">