Language in Ajax requested partial vies

Hey everyone

I have a form that is being requested via ajax

$.getJSON("http://<url>?r=register/showRegister&lang=<?php echo Yii::app()->language; ?>");

and in my function i do the following:

function actionShowRegister ($lang) {

        Yii::app()->language = $lang;


Is there a better way so that the partial view knows the "outside" language?

If i don’t do this, it always takes the language defined in the main.php config file.

You can keep your language into session, so you don’t have to pass it with every ajax request.

ah yeah thanks good idea :)