Improve locale handling
This commit is contained in:
parent
b4dd0aeb29
commit
0f80cbd333
7 changed files with 118 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
{locale path="../i18n" domain="Alltube"}
|
||||
<!Doctype HTML>
|
||||
<html lang="{$locale|replace:'_':'-'}">
|
||||
<html lang="{$locale->getBcp47()}">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name=viewport content="width=device-width, initial-scale=1">
|
||||
|
@ -10,6 +10,7 @@
|
|||
<meta property="og:description" content="{$description|escape}" />
|
||||
{/if}
|
||||
<link rel="stylesheet" href="{base_url}/dist/main.css" />
|
||||
<link rel="stylesheet" href="{base_url}/bower_components/flag-icon-css/css/flag-icon.min.css" />
|
||||
<title>AllTube Download{if isset($title)} - {$title|escape}{/if}</title>
|
||||
<link rel="canonical" href="{$canonical}" />
|
||||
<link rel="icon" href="{base_url}/img/favicon.png" />
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
</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 $locales as $supportedLocale}
|
||||
<li><a href="{path_for name='locale' data=['locale'=>$supportedLocale->getIso15897()]}"><span class="flag-icon flag-icon-{$supportedLocale->getIso3166()}"></span> {$supportedLocale->getFullName($locale)}</a></li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue