Display each locale in its own language
This commit is contained in:
parent
3ead8dd458
commit
90dc6f4478
2 changed files with 3 additions and 5 deletions
|
@ -51,13 +51,11 @@ class Locale
|
|||
/**
|
||||
* Get the full name of the locale.
|
||||
*
|
||||
* @param Locale $displayLocale Locale to get the name in
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFullName(Locale $displayLocale)
|
||||
public function getFullName()
|
||||
{
|
||||
return \Locale::getDisplayName($this->getIso15897(), $displayLocale->getIso15897());
|
||||
return \Locale::getDisplayName($this->getIso15897(), $this->getIso15897());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<ul class="locales">
|
||||
{if isset($locales)}
|
||||
{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>
|
||||
<li><a href="{path_for name='locale' data=['locale'=>$supportedLocale->getIso15897()]}"><span class="flag-icon flag-icon-{$supportedLocale->getIso3166()}"></span> {$supportedLocale->getFullName()}</a></li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue