Hi,

You can store the user's language in session to use it during the
browsing, or you could use the Accept-Language header sent by the
browser to guess the user language, use this function:
CakeRequest::acceptLanguage();
Or you can even ask it that user has a language for instance
CakeRequest::acceptLanguage('en'); would return true if browser send
'en' in Accept-Language header.

You can see where that 8 is found in the request object if you print
it out with:
debug($this->request);

Or from the manual:
"If you are planning to use custom named arguments with your route,
you have to make the router aware of it using
the :php:meth`Router::connectNamed()` function. So if you want the
above route to match urls like /cooks/some_action/type:chef we do:

<?php
Router::connectNamed(array('type'));
Router::connect(
    '/cooks/:action/*', array('controller' => 'users')
);"

For more detail about named parameters consult with this part of the
book:
http://book.cakephp.org/2.0/en/development/routing.html?highlight=routing#named-parameters

bye

On nov. 21, 13:10, heohni <[email protected]>
wrote:
> And another question:
>
> I would like to route this path: domain.com/search-in/categoryname/
> categoryId
>
> to this domain domain.com/items/search/cat:8
> means controller=>items, action=>search ... but how can I pass the cat:
> 8 where the number 8 is a variable number?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to