propelorm/sfPropelORMPlugin — Issue #109: propel 1.6 i18n behavior
Author: xplo
Created: 2012-02-03 21:45:11+00:00
State: open

Hello,
i posted this in the google groupe 6month ago but got no answer so i ll try there http://groups.google.com/group/propel-users/browse_thread/thread/f16c927a0329a1b6/a16610d073a08e68

I m migrating a project from the old symfony i18n behavior to the new
propel i18n behavior.
It seems backward compatibility is broken because propel doesn't use
the symfony locale in session. You have to set it manualy in each
request.
It means that :
//old symfony behavior : works ok because it use the locale in the
symfony session
$book = TblBookQuery::create()->findOne();
$book->getName();
//new propel i18n behavior : not ok because propel will use the
default locale in schema.yml instead of the locale in symfony session
$book = TblBookQuery::create()->findOne();
$book->getName();
//you have instead to do
$book = TblBookQuery::create()->findOne();
$book->setLocale('fr');
$book->getName();
Am i doing something wrong ?