Symfony - translations stop working after rendering controler in another's view -


i'm building webiste, there lots of "widgets" displayed on front page. 1 of them calendar. wanted make new controller each "widget", , render them (like example below), in homepage view. hovewer - translations stop working after that. if visit mywebpage/calendar, work, not when got mywebpage/home.

this code have homepage view.

{% block calendar %}     {{ render(controller('mywebsite:calendar:index')) }} {% endblock %} 

am approaching correctly or not? , why translations stop working? - hope understand issue :)

thanks!

i surprised doesn't work, have else in app interfering request object?

maybe passing locale request argument controller may work (although bit of hack)?

{% block calendar %}     {{ render(controller('mywebsite:calendar:index', { _locale: app.request.locale })) }} {% endblock %} 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -