I'm using symfony and propel, and I'm trying to invoke a specific culture on an object and output some fields of that object to the screen in that specific culture. However, if the object's mapped database record doesn't have those fields in that specific culture, I would like it to default to the base culture (in this case, en_US)
I'm doing it like this:
$currentLesson = $currentLesson->getCurrentLessonsI18n($lessonCulture);
But when I output such as this
$currentLesson->getTitle();
It outputs an empty string if there is no culture record for it. My question is, is there a way to make an object default to a specific culuture if the one I specify isn't available, or is there a method to see if a specific object has a culture i18n record?
something like this:
if($currentLesson->cultureExists($lessonCulture) $currentLesson = $currentLesson->getCurrentLessonsI18n($lessonCulture);
or
sfConfig::setPropelDefaultCulture("en_US");
Thanks for the help.