Re: Lang in url and named parameters

2009-05-13 Thread Pixelastic
Hmm, I'm not quite getting what you're saying. > You don't need an extra parameter, I think you can use this code on app_helper.php: Well, isn't the language parameter an extra parameter ? Anyway, I'm allready using a similar code than the one given by teknoid, and it works well. By problem was

Re: Lang in url and named parameters

2009-05-11 Thread Marco
Changing ['language'] with ['lang'] in your case On May 11, 7:48 am, Marco wrote: > On May 10, 10:25 am, Pixelastic wrote: > > > I want to keep the :lang parameter in the url for SEO purposes. This > > way each ressource of my app will have a different url and my pages > > will be indexed in al

Re: Lang in url and named parameters

2009-05-11 Thread Marco
On May 10, 10:25 am, Pixelastic wrote: > I want to keep the :lang parameter in the url for SEO purposes. This > way each ressource of my app will have a different url and my pages > will be indexed in all the available languages (seems logical as their > content will be different). > You don't n

Re: Lang in url and named parameters

2009-05-11 Thread Edi
Could you give example for using prefix routing in language purposes? On May 10, 10:57 pm, Miles J wrote: > I would suggest prefix > routing:http://book.cakephp.org/view/46/Routes-Configuration#Prefix-Routing-544 --~--~-~--~~~---~--~~ You received this message be

Re: Lang in url and named parameters

2009-05-10 Thread John Andersen
Ok, then maybe a Sitemap should be considered instead of the lang paramater! See http://en.wikipedia.org/wiki/Sitemap for more information. Enjoy, John On May 10, 4:25 pm, Pixelastic wrote: > I want to keep the :lang parameter in the url for SEO purposes. This > way each ressource of my app w

Re: Lang in url and named parameters

2009-05-10 Thread Miles J
I would suggest prefix routing: http://book.cakephp.org/view/46/Routes-Configuration#Prefix-Routing-544 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@g

Re: Lang in url and named parameters

2009-05-10 Thread Pixelastic
I want to keep the :lang parameter in the url for SEO purposes. This way each ressource of my app will have a different url and my pages will be indexed in all the available languages (seems logical as their content will be different). On 8 mai, 18:55, John Andersen wrote: > Thanks :) > My que

Re: Lang in url and named parameters

2009-05-08 Thread John Andersen
Thanks :) My question then is, why do you carry along this parameter in the url? In my opinion, it should just be remembered in the session, until the user chooses another language (if ever). Is it for other reasons, that you want to carray the parameter in the url? John On May 8, 4:03 pm, Pix

Re: Lang in url and named parameters

2009-05-08 Thread Pixelastic
Yes, that is the purpose of this parameter. On May 8, 2:16 pm, John Andersen wrote: > Is the purpose of the named parameter (lang) for you to be able to > present content in the specified language? >    John > > On May 8, 2:28 pm, Pixelastic wrote: > > > Hello, > > > I'm doing some i18n in my a

Re: Lang in url and named parameters

2009-05-08 Thread John Andersen
Is the purpose of the named parameter (lang) for you to be able to present content in the specified language? John On May 8, 2:28 pm, Pixelastic wrote: > Hello, > > I'm doing some i18n in my app and so I have defined routes with > a :lang parameters like this : > Router::connect('/:lang/:con

Lang in url and named parameters

2009-05-08 Thread Pixelastic
Hello, I'm doing some i18n in my app and so I have defined routes with a :lang parameters like this : Router::connect('/:lang/:controller/:action/*', array('lang' => null), array('lang'=>'[a-z]{2}')); Everything is working fine. But I also have a index action that allow named parameters to be p