What I'm trying to achieve is that I can change only language prefix in the
url, but getting problems... There is my routes:
$lang_regexp = implode('|', Configure::read('Config.languages'));
Router::connect('/', array('controller' = 'languages', 'action' = 'choose'));
Router::connect('/:lang/:controller/:action/*',
array(),
array('lang' = $lang_regexp));
// actual default page; can be any controller
Router::connect('/:lang/pages/ajax_newsletter', array('controller' =
'pages', 'action' = 'ajax_newsletter'));
Router::connect('/:lang/',
array('controller' = 'pages', 'action' = 'index', 'home'),
array('lang' = $lang_regexp));
Router::connect('/:lang/:slug', array('controller' = 'pages', 'action' =
'pages'), array('lang' = $lang_regexp));
Router::connect('/:slug', array('controller' = 'pages', 'action' =
'pages'), array('lang' = $lang_regexp));
Router::connect('/:lang/special_offers', array('controller' = 'pages',
'action' = 'offers'));
Router::connect('/:lang/special_offers/*', array('controller' = 'pages',
'action' = 'offers_city'));
Router::connect('/:lang/news/*', array('controller' = 'pages', 'action' =
'news_article'));
Router::connect('/:lang/news', array('controller' = 'pages', 'action' =
'news'));
Router::connect('/:lang/:slug/:id/*', array('controller' = 'pages',
'action' = 'offers'), array('lang' = $lang_regexp));
Router::connect('/cities/select', array('controller' = 'cities', 'action'
= 'select'));
Router::connect('/cities/select/*', array('controller' = 'cities',
'action' = 'select'));
my language switcher:
$this-html-link($this-html-image('flag_ru.gif', array(alt=,
width=14px, height=12px, title=)), array(lang = rus),
array('escape' = false));
:lang/:slug is menu entry so if I have menu like localhost/eng/contactafter
language change I get
localhost/rus/pages/pages... How to change only language prefix?
--
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
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.