Restore full local name in settings
- Fallback to two-letter language code for translation if locale isn't found - Rename L10n::langToString to L10n::localeToLanguageString - Use setlocale() with the selected locale
This commit is contained in:
parent
012a3f9f8d
commit
e8752c7631
7 changed files with 75 additions and 11 deletions
|
|
@ -67,7 +67,7 @@
|
|||
<div class="dropdown-menu" aria-labelledby="languageDropdown">
|
||||
<?php foreach($languages as $lang):?>
|
||||
<a class="dropdown-item" href="?lang=<?php echo $this->escapeUrl($lang)?>">
|
||||
<?php echo $this->e(Friendica\Directory\Utils\L10n::langToString($lang)) ?>
|
||||
<?php echo $this->e(Friendica\Directory\Utils\L10n::localeToLanguageString($lang)) ?>
|
||||
</a>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ if (!empty($profile['country'])) {
|
|||
<?php if ($profile['language']):?>
|
||||
<div class="language">
|
||||
<i class="fa fa-language" alt="<?php echo $this->__('Language')?>" title="<?php echo $this->__('Language')?>"></i>
|
||||
<?php echo $this->e(Friendica\Directory\Utils\L10n::langToString($profile['language'])) ?>
|
||||
<?php echo $this->e(Friendica\Directory\Utils\L10n::localeToLanguageString($profile['language'])) ?>
|
||||
<a href="/search?field=language&q=<?php echo $this->escapeUrl($profile['language']) ?>">
|
||||
<i class="fa fa-filter" title="<?php echo $this->__('Filter by language')?>"></i>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ $base_url_display = substr($base_url, strpos($base_url, '/') + 2);
|
|||
<?php if ($server['language']):?>
|
||||
<span class="badge badge-secondary" title="<?php echo $this->__('Default Language')?>">
|
||||
<i class="fa fa-language" alt="<?php echo $this->__('Default Language')?>"></i>
|
||||
<?php echo $this->e(Friendica\Directory\Utils\L10n::langToString($server['language'])) ?>
|
||||
<?php echo $this->e(Friendica\Directory\Utils\L10n::localeToLanguageString($server['language'])) ?>
|
||||
</span>
|
||||
<?php endif;?>
|
||||
<span class="badge badge-secondary" title="<?php echo $this->__('Known Users')?>">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<?php foreach ($languages as $language): ?>
|
||||
<li>
|
||||
<a href="search?field=language&q=<?php echo $this->escapeUrl($language['language']) ?>">
|
||||
<?php echo $this->e(Friendica\Directory\Utils\L10n::langToString($language['language'])) ?>
|
||||
<?php echo $this->e(Friendica\Directory\Utils\L10n::localeToLanguageString($language['language'])) ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue