I think what you need to do is add something to your AppController to
look for $this->params['lang'] and
$this->Session->write('Config.language', $lang);
I'm really not sure but this is what I had in mind. I'll need to do
this same thing very shortly. If you figure it out, please post your
solution.
BTW, I think you need to use the 3-letter code. I prefer 2-letter
myself but it seems Cake needs the 3-letter version. Correct me if I'm
wrong (the information on I18N, L10N, etc. is very confusing).
On Thu, Mar 6, 2008 at 6:19 AM, TriLLi <[EMAIL PROTECTED]> wrote:
>
> I need help
> How can I tell cake that first paramter in routing is language
> Router:Connect('/en/products/index/', Array('lang' =>'en',
> 'controller'=>'products', 'action'=>'index'));
>
> so it can rewrite links in my views
> $html->link(__('New Product', true), array('action'=>'add'));
> so link can be
> http://www.example.com/en/products/add
>
> this is because I have dozen languages on web site...
> npr for bosnian link should be
>
> http://www.example.com/ba/proizvodi/dodaj
>
> I have routing file filled with all routes
> like
> Router:Connect('/ba/products/pocetna/', Array('lang' =>'ba',
> 'controller'=>'products', 'action'=>'index'));
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---