mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
When switching language, it now stays on the same site.
Before that commit, you were redirect to homepage when using the language buttons.
This commit is contained in:
parent
3fe452626d
commit
b06a4479a6
1 changed files with 6 additions and 2 deletions
|
@ -104,8 +104,12 @@
|
|||
{% endif %}
|
||||
<li role="separator" class="dropdown-divider"></li>
|
||||
<a class="dropdown-item disabled" href="#">{% trans %}user.language_select{% endtrans %}</a>
|
||||
<a class="dropdown-item" href="{{ path('homepage.en') }}">{% trans %}language.english{% endtrans %}</a>
|
||||
<a class="dropdown-item" href="{{ path('homepage.de') }}">{% trans %}language.german{% endtrans %}</a>
|
||||
<a class="dropdown-item" href="{{ path(app.request.attributes.get('_route'),
|
||||
app.request.attributes.get('_route_params')|merge({'_locale': 'en'})) }}">
|
||||
{% trans %}language.english{% endtrans %}</a>
|
||||
<a class="dropdown-item" href="{{ path(app.request.attributes.get('_route'),
|
||||
app.request.attributes.get('_route_params')|merge({'_locale': 'de'})) }}">
|
||||
{% trans %}language.german{% endtrans %}</a>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue