i’m building a web with a frontend based on wordpress and a private area based on symfony. The web have several languages, to wordpress i use qtranslate and i want to take the language selected in wordpress to change the culture in the symfony part. Any ideas?
Sorry for my english :-/
Thanks!
When you use i18n in Symfony the culture can be switched automatically when you change the “magic” parameter
sf_culture
during request (using GET or POST). If this not enough you can switch the culture in an action by callingYou can for example keep the current WordPress culture in a cookie and read the cookie from your Sf backend. You can either change the culture in each action, or create a filter that will check if the WordPress culture has changed and change it if needed.