integrate twig/intl-extra to make locale codes translation #19

This commit is contained in:
ghost 2023-10-03 23:30:50 +03:00
parent 7750a214e0
commit 0224fbf23a
4 changed files with 143 additions and 10 deletions

View file

@ -74,17 +74,13 @@
<tr>
<td class="padding-t-16-px">{{ 'Interface'|trans }}</td>
<td class="padding-t-16-px">
{{ user.locale|trans }}
{{ user.locale|locale_name(user.locale)|u.title }}
</td>
</tr>
<tr>
<td>{{ 'Content filter'|trans }}</td>
<td>
{% for locale in user.locales %}
<div class="padding-y-4-px">
{{ locale|trans }}
</div>
{% endfor %}
{% for i, locale in user.locales %}{% if i > 0 %},{% endif %} {{ locale|locale_name(locale)|u.title }}{% endfor %}
</td>
</tr>
</tbody>