Hi.

I have tried to implement a multi-language website using the official
internationalization guide (http://book.cakephp.org/view/161/
localization-internationalizat), but it only works if I change the
DEFAULT_LANGUAGE in the bootstrap. I have created a language switching
class


uses('L10n'); print_r($this);
class LangsController extends AppController
{
                var $name = 'Langs';
        var $uses = array();

                function index() {}

                function switchto($lang) {
                        if($lang == "eng") {
                                $this->L10n = new L10n();
                                $this->L10n->get("eng");
                                Configure::write('Config.language', "eng");
                        }
                        if($lang == "hrv") {
                                $this->L10n = new L10n();
                                $this->L10n->get("hrv");
                                Configure::write('Config.language', "hrv");
                        }
                        $this->redirect(Controller::referer('/', true));
                }
}

but id doesn't do anything :(

Any ideas?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to