Hi all,
Back in August 2009, there was a thread on handling language inside URL
and Troels suggested
"having your root component extend from the language-segment component"
http://groups.google.com/group/konstrukt/browse_thread/thread/507cceb9b2e6ad61/ebb3cde20d49dc02?lnk=gst&q=url+language#ebb3cde20d49dc02
i'm looking into implementing mod_rewrite language/cookie detection
and my hack was to strip REQUEST_URI in k_HttpRequest
# hit when cookie present
RewriteCond
%{HTTP_COOKIE} language=([^;]+) [NC]
RewriteRule
^([en|de|nl]*)/(.*)$ index.php?$2 [env=prefer-language:%1,L]# hit when cookie not present
RewriteRule ^.*$
index.php [L]# k_HttpRequest
# obviously needs coupling with
prefer-language $_SERVER variable
$strRequest = preg_replace( '~^[^/]*[/]{0,1}[en|de|nl]+~', '', $this->server['REQUEST_URI']);am not happy with the hack at all, this is only R&D stuff i'm doing,
i am aware that i have to hack url() also and don't know how it cascades deeper.
My question is: has Troels recommendation become official ? Has anyone used it extensively?
(don't see it implemented in language example)
Thanks a lot
_____________________________________________
Marius Rugan
mariusrugan marius.rugan