mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-02 09:14:48 +02:00
Set the language of the CKEDITOR5 elements based on the page locale.
This commit is contained in:
parent
63b7e0458c
commit
b18284cfd7
3 changed files with 19 additions and 7 deletions
|
@ -51,9 +51,15 @@
|
|||
{% block javascripts %}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{{ encore_entry_script_tags('ru2ftwofactor') }}
|
||||
|
||||
{# load translation files for ckeditor #}
|
||||
{% set two_chars_locale = app.request.locale|default("en")|slice(0,2) %}
|
||||
{% if two_chars_locale != "en" %}
|
||||
<script src="{{ asset("build/ckeditor_translations/" ~ two_chars_locale ~ ".js") }}"></script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body data-base-url="{{ url('homepage', {'_locale': app.request.locale}) }}">
|
||||
<body data-base-url="{{ url('homepage', {'_locale': app.request.locale}) }}" data-locale="{{ app.request.locale|default("en")|slice(0,2) }}">
|
||||
{% block body %}
|
||||
<header>
|
||||
<turbo-frame id="navbar-frame" target="content" data-turbo-action="advance">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue