File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 44 See https://symfony.com/doc/current/templates.html#template-inheritance-and-layouts
55#}
66<!DOCTYPE html>
7- <html lang =" {{ app .request . locale }}" >
7+ <html lang =" {{ app .locale }}" >
88 <head >
99 <meta charset =" UTF-8" />
1010 <meta name =" viewport" content =" width=device-width, initial-scale=1" />
102102 {{ render_esi(controller(' Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController::templateAction' , {
103103 ' template' : ' blog/about.html.twig' ,
104104 ' sharedAge' : 600 ,
105- ' _locale' : app .request . locale
105+ ' _locale' : app .locale
106106 })) }}
107107 {% endblock %}
108108 </div >
Original file line number Diff line number Diff line change 66 <pubDate >{{ ' now' | date (' r' , timezone=' GMT' ) }}</pubDate >
77 <lastBuildDate >{{ (paginator .results | last ).publishedAt| default (' now' )| date (' r' , timezone=' GMT' ) }}</lastBuildDate >
88 <link >{{ url(' blog_index' ) }}</link >
9- <language >{{ app .request . locale }}</language >
9+ <language >{{ app .locale }}</language >
1010
1111 {% for post in paginator .results %}
1212 <item >
Original file line number Diff line number Diff line change 22 <a href =" #" class =" nav-link dropdown-toggle language-selector-dropdown-button" data-toggle =" modal" data-target =" #locale-selector-modal" role =" button" id =" locales" >
33 <twig:ux:icon name =" tabler:world" />
44 {% if display_current_language %}
5- <span class =" current-language" >{{ app .request . locale | locale_name }}</span >
5+ <span class =" current-language" >{{ app .locale | locale_name }}</span >
66 {% endif %}
77 <span class =" caret" ></span >
88 <span class =" sr-only" >{{ ' menu.choose_language' | trans }}</span >
2424 <div class =" modal-body" >
2525 <ul class =" locales" >
2626 {% for locale in locales() %}
27- {% set is_active = app .request . locale == locale .code %}
27+ {% set is_active = app .locale == locale .code %}
2828 {% set is_rtl = locale .code in [' ar' , ' fa' , ' he' ] %}
2929 <li class =" {{ is_active ? ' active' }} {{ is_rtl ? ' rtl' }}" translate =" no" >
3030 <a class =" stretched-link" lang =" {{ locale .code }}" hreflang =" {{ locale .code }}" href =" {{ path(app .current_route ?? ' blog_index' , app .current_route_parameters | merge ({_locale : locale .code })) }}" >
You can’t perform that action at this time.
0 commit comments