OK, i have written following code and it seems to work:
<?php
class AppHelper extends Helper {
function url($url=null, $full=false) {
$url_array=Router::parse($url);
if(strpos($url_array['controller'],':')>0) { // to
avoid external
links, mailto etc...
$new_url=parent::url($url, $full);
} else {
$new_url=str_replace($url_array['controller'],
'en/'.
$url_array['controller'], parent::url($url, $full));
}
return $new_url;
}
}
?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---- changing links according to selected language K3
- Re: changing links according to selected language b logica
- Re: changing links according to selected language djiize
- Re: changing links according to selected language leo
- Re: changing links according to selected languag... K3
- Re: changing links according to selected la... djiize
- Re: changing links according to selecte... leo
- Re: changing links according to sel... K3
- Re: changing links according to sel... K3
- Re: changing links according to sel... Pedro
- Re: changing links according to selecte... K3
- Re: changing links according to selected languag... b logica
