Add Internationalization

- Add Utils/L10n class
- Add translator functions to PHP Renderer
- Refactor web controllers to prevent duplicated code
- Add locale middleware
- Add translation file loading
- Add i18n settings
This commit is contained in:
Hypolite Petovan 2018-11-15 23:59:00 -05:00
commit 5b7bb030de
21 changed files with 537 additions and 245 deletions

View file

@ -0,0 +1,12 @@
<div>
<h3><?php echo $this->__('Popular Languages')?></h3>
<ul>
<?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'])) ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>