Kaynağa Gözat

Fixed translation in title breadcrumb (#4086)

Christian Gripp 8 yıl önce
ebeveyn
işleme
4a34c3b076
1 değiştirilmiş dosya ile 7 ekleme ve 1 silme
  1. 7 1
      Resources/views/standard_layout.html.twig

+ 7 - 1
Resources/views/standard_layout.html.twig

@@ -92,7 +92,13 @@ file that was distributed with this source code.
                                 >
                             {% endif %}
 
-                            {{ menu.label }}
+                            {%- set translation_domain = menu.extra('translation_domain', 'messages') -%}
+                            {%- set label = menu.label -%}
+                            {%- if translation_domain is not same as(false) -%}
+                                {%- set label = label|trans(menu.extra('translation_params', {}), translation_domain) -%}
+                            {%- endif -%}
+
+                            {{ label }}
                         {% endif %}
                     {% endfor %}
                 {% endif %}