File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/Symfony/Bridge/Twig/Resources/views/Form Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 123
123
{%- set type = type | default (' file' ) -%}
124
124
{{- block (' form_widget_simple' ) -}}
125
125
{%- set label_attr = label_attr | merge ({ class : (label_attr .class |default (' ' ) ~ ' custom-file-label' )|trim }) -%}
126
- <label for =" {{ form .vars .id }}" lang =" {{ app .request .locale }}" {% with { attr : label_attr } %}{{ block (' attributes' ) }}{% endwith %}>
126
+ {%- set input_lang = ' en' -%}
127
+ {% if app is defined and app .request is defined %}{%- set input_lang = app .request .locale -%}{%- endif -%}
128
+ <label for =" {{ form .vars .id }}" lang =" {{ input_lang }}" {% with { attr : label_attr } %}{{ block (' attributes' ) }}{% endwith %}>
127
129
{%- if attr .placeholder is defined and attr .placeholder is not none -%}
128
130
{{- translation_domain is same as (false ) ? attr .placeholder : attr .placeholder | trans({}, translation_domain ) -}}
129
131
{%- endif -%}
You can’t perform that action at this time.
0 commit comments