I can see many questions regarding configuring the path using Windows OS. I could hardly get the right information about it. The cook book has defined for Linux. So I would like to share my idea on it.
To configure the Yii path using Windows OS,
I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.
For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language.
This tutorial shows a Yii-way of doing this.
We implement an event handler for the onBeginRequest event; as the name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly.
We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.