twig - How to get country language in Symfony -


i'm customizing error pages , wandering if possible language of country user directly in template, without controller.

you can use :

{{ app.request.locale }} 

edit

ah didn't understood question looking :

 $request->getpreferredlanguage($anarrayofyoursupportedlanguages); 

then pass twig. fabpot answer :

https://groups.google.com/forum/#!topic/symfony-devs/-2awaqhlllq


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -