Have a look at Jason Chow's P28N tutorial: http://bakery.cakephp.org/articles/view/p28n-the-top-to-bottom-persistent-internationalization-tutorial
He uses both a component and a controller fr switching. I haven't implemented everything quite the same way but this part works like a charm. On Fri, May 16, 2008 at 4:23 AM, Kukuda <[EMAIL PROTECTED]> wrote: > > 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 -~----------~----~----~----~------~----~------~--~---
