i18n between Symfony 1.4 and WordPress 3

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 :-/

Read More

Thanks!

Related posts

Leave a Reply

1 comment

  1. 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 calling

    $this->getUser()->setCulture($culture);
    

    You 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.