mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
integrate twig/intl-extra to make locale codes translation #19
This commit is contained in:
parent
7750a214e0
commit
0224fbf23a
4 changed files with 143 additions and 10 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -71,9 +71,13 @@
|
|||
<select name="locale">
|
||||
{% for locale in locales %}
|
||||
{% if locale == user.locale %}
|
||||
<option value="{{ locale }}" selected="selected">{{ locale|trans }}</option>
|
||||
<option value="{{ locale }}" selected="selected">
|
||||
{{ locale|locale_name(locale)|u.title }}
|
||||
</option>
|
||||
{% else %}
|
||||
<option value="{{ locale }}">{{ locale|trans }}</option>
|
||||
<option value="{{ locale }}">
|
||||
{{ locale|locale_name(locale)|u.title }}
|
||||
</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
@ -90,7 +94,7 @@
|
|||
<input name="locales[]" id="{{ locale }}" type="checkbox" value="{{ locale }}" />
|
||||
{% endif %}
|
||||
<label for="{{ locale }}">
|
||||
{{ locale|trans }}
|
||||
{{ locale|locale_name(locale)|u.title }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue