I'm trying to access translations through a twig.
For example, I have my application name inside Resources/translations/messages.de.yml and Resources/translations/messages.en.yml
My controller only renders from the twig file.
And inside my twig file I want to access the application.name property, which is defined inside the message file (yml)
How can I access this property to get the name of the application (let it contain some information related to the language)
I tried these methods and failed:
{{ application.name }}
- It looks like for the variables that were sent through the controller, I have an error that the variable 'application' was not found
{% trans% } application.name {% endtrans %}- displays application.name
{% trans% } 'application.name' {% endtrans %}- displays 'application.name'
eav
source share