I am working on a multilangual site, in which I have implements 2 languages i.e. Arabic and English.
But I want that when I select the Arabic language then the layout of the theme should be from right-to-left and when select english language then the layout should change to left-to-right.
I have created the right-to-left and left-to-right layouts of the theme, but I am cunfused that How can I implement this ?
There is $layout property in CController, that holds “the name of the layout to be applied to this controller’s views”. This what U should use to switch between layouts.
Simple solution would be to check language on beforeAction or beforeRender, something like: