Comments on: Persistent localized routes with Lithium /php/persistent-localized-routes-with-lithium/?utm_source=rss&utm_medium=rss&utm_campaign=persistent-localized-routes-with-lithium A glimpse at a coder's troubled mind Sun, 07 Apr 2013 02:38:13 +0000 hourly 1 By: Max /php/persistent-localized-routes-with-lithium/comment-page-1/#comment-31464 Max Tue, 04 Sep 2012 14:02:05 +0000 /?p=252#comment-31464 Thanks for this!

I found the following route setting to work better in most cases:

Router::connect(‘/{:locale:[a-z]{2}(_[A-Z]{2})?}/{:args}’, array(), array(‘continue’ => true, ‘persist’ => array(‘locale’)));

Best regards,

By: rapzo /php/persistent-localized-routes-with-lithium/comment-page-1/#comment-31370 rapzo Mon, 07 May 2012 16:27:02 +0000 /?p=252#comment-31370 Great how-to, congrats!
Although, i think the redirection is unnecessary. Setting $params['request']->location = $url; does the trick. Just don’t know if it is the best practice.