diff --git a/README.md b/README.md index 689ce18..8744bf9 100644 --- a/README.md +++ b/README.md @@ -55,15 +55,15 @@ If you try to access `http://www.domain.tld/`, the module will redirect it to `h Let's say we have a product page, with kohana 3 we'd have something like : -Route::set('product.details', 'products/-', array( - 'product_id' => '[0-9]+', - 'product_slug' => '.+', -))->defaults(array( - 'controller' => 'Product', - 'action' => 'details', - 'product_id' => NULL, - 'product_slug' => '', -)); + Route::set('product.details', 'products/-', array( + 'product_id' => '[0-9]+', + 'product_slug' => '.+', + ))->defaults(array( + 'controller' => 'Product', + 'action' => 'details', + 'product_id' => NULL, + 'product_slug' => '', + )); @@ -118,4 +118,4 @@ If you have any suggestions, found a bug or anything, feel free to share. We change the Request to force the detection of a language on the site root. Then if a route is found, we get the language from it with its 'lang' parameter and we initialize. Each route created with a language code gets another parameter: `lang`. A uri like `products/details` will become `/products/details`. -But since every multilingual route is unique (except default), the regex part allows only one language code. So we have `array('lang' => 'en')` instead of having something like `array('lang' => '(en|fr|de')`. We could have directly the language code in the uri like `en/products/details` but the lang parameter allows us to easily retrieve the route language and works better with the default route. \ No newline at end of file +But since every multilingual route is unique (except default), the regex part allows only one language code. So we have `array('lang' => 'en')` instead of having something like `array('lang' => '(en|fr|de')`. We could have directly the language code in the uri like `en/products/details` but the lang parameter allows us to easily retrieve the route language and works better with the default route.