setLanguage not working for me

In my controller, I set language to es…

Yii::app()->setLanguage("es");

I then display the language…

echo "Language updated to " . Yii::app()->getLanguage();

It prints "Language updated to es". (This makes me happy)

I then move to another web page and print the language (Yii::app()->getLanguage()) and it prints "en_us". (Not happy any more)

Does anyone know why my language is being reset to en_us after it was changed to "es"?

Calls to translate only give me the english version no matter what I attempt to set my language to.

This link solved my problem…

http://www.yiiframework.com/forum/index.php?/topic/18506-internationalization-issue/page__p__93514__hl__+etLanguage#entry93514

I needed this code at the top of my main page to set language each time the web page loads…

<?php Yii::app()->setLanguage(isset(Yii::app()->session[‘lang’]) ? Yii::app()->session[‘lang’] : ‘en_us’); ?>