I've got a small problem with routing in kohana 3.2. I want to create a simple blog with multiple language support.
I want to create links like this:
- pl.yourwebsite.com/kontakt
- en.yourwebsite.com/contact
- xx.yourwebsite.com/sometranslation of controller above
I set up a simple controller for contact and routes, but when it comes to route i must set static route, which is quite a bad solution. For example:
for pl lang:
Route::set('kontakt', 'kontakt(/<action>(/<id>(/<id2>(/<id3>))))')
->defaults(array(
'controller' => 'contact',
'action' => 'index',
));
It works when I use domain.com/contact
and domain.com/kontakt
, but when I will have 20+ controllers and 3 langugage; that will be 60+ routes == bad solution.
I appreciate any help.