Setting shop language from view class module

Hi developers,
sorry to bother you with this (hopefully) simple question:
How can I change the shop language in a view class module?

I just couldn’t find anything regarding this in the source code docu.

Thanks!

Martin

For example:

     
    public function init()
    {
        $sChangelang = 1;
        $oLang = oxLang::getInstance();
        $oLang->setBaseLanguage( $oLang->validateLanguage( $sChangelang ) );
        parent::init();
    }

Hi leofonic!
Thank you for the hint!
In the meantime I also found this code in oxcmp_lang.php.
There is some more code there but I don’t know why…


                // recalc basket
                $oBasket = $this->getSession()->getBasket();
                $oBasket->onUpdate();

Any idea why the basket has to be recalculated after a language change?

Regards,
Martin

Sorry no idea, i think it’s not really neccesary, maybe someone else knows more?

[QUOTE=kircma;50089]
Any idea why the basket has to be recalculated after a language change?
[/QUOTE]

Maybe because of possibly different currencies for different languages?

[QUOTE=Hebsacker;50112]Maybe because of possibly different currencies for different languages?[/QUOTE]
But there is no such possibility as far as i know.