Kohana multi language website
Posted
by Sobek
on Stack Overflow
See other posts from Stack Overflow
or by Sobek
Published on 2010-06-11T08:59:59Z
Indexed on
2010/06/11
9:02 UTC
Read the original article
Hit count: 608
kohana
|multi-language
.I'm trying to set up a multi language website with kohana v3, following this tutorial: http://kerkness.ca/wiki/doku.php?id=example_of_a_multi-language_website
Routing to a controller or action within i.e. website/controller/action
seems to work as the url is properly redirected to website/lang/controller/action
.
However this is not working for ajax request calls. I have to manually edit the url with the appropriate language, to successfully retrieve the data. This also applies for anchors on the html page.
In addition to this problem, the overflow parameter 'id' also doesn't work. It takes the 'lang' variable as its parameter.
I have setup my default route just like in the tutorial i.e.:
Route::set('default', '((<lang>)(/)(<controller>)(/<action>(/<id>)))', array('lang' => "({$langs_abr})",'id'=>'.+')) ->defaults(array('lang' => $default_lang,'controller' => welcome', 'action' => 'index'));
Any help is much appreciated ! Cheers
© Stack Overflow or respective owner