I'm developing a multi-lingual site.
Some languages uses right-to-left layouts and some left-to-right.
So some of my view scripts have another RTL view script that I want to load automatically.
I wrote a plugin that checks if the user is RTL and if yes it adds '.rtl' to the suffix of the file: Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer')- >setViewSuffix('rtl.phtml');
the problem is that not all of my view scripts have an rtl view script, so I want to check if the file exist....
the problem with that if I do in my controller $this->render('someScript') then I've got no way to check if the .rtl script exist.. as far as I know.
In short: is there some way (event) to hook up after the action finishes but before it renders?
Maybe I should write a custom view renderer?
Thanks.