Hi,
It is in reality a bit different from what the maunal currently
states. Both simpler and more complicated :)
Try this:
http://groups.google.com/group/cake-php/browse_thread/thread/3ada672bf5a86b6b/37046b1cc949ddb8?lnk=gst&q=i18n#37046b1cc949ddb8

And search fir i18n, l10n or p28n for more.
There is also a bakery article with some ideas about the persistance
part of localizing.

I would suggest switching off all caching when trying this out since
language-data is caches and you may notget the result you expect until
the cache expires a while later. :)
I would also suggest starting with a "common" language like "eng" just
to get basic setup right before trying some crazy sub-dialect of
something like Spanish (there are many different versions of Spannish
which can trip you up at first.)

/Martin


On May 16, 12:42 pm, 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 cake-php@googlegroups.com
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