downside of such an approach is that you would
have to change all your templates when you must
change the template structure (tables, lists, etc.)
in my opinion one should differ between the view
layout (templates) and textual content - which can
be in whatever language. so i would rather stay
with trans keys etc.
but you could easily create more than one template
file, e.g. textEnSuccess.php, textFrSuccess.php etc.
in your controller's actions you then would set the
template dynamically containing the current user's
language:
public function executeWhatever()
{
...
$this->setTemplate($this->getActionName() .
ucfirst($this->getUser()->getCulture()));
}
You could even automate it while overwriting sfAction's preExecute
method...
I did not try it but something like this should work.
jp
On Sun, 03 Feb 2008 10:55:03 +0100, Thierry
<[EMAIL PROTECTED]> wrote:
>
> To have different templates for different languages...
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---