Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthordelia
    • CommentTimeMay 19th 2008
     
    hi again,

    i need to change the locale in the actual page, for example, i need to change from /es/news to /en/news just by clicking the typical change language link in the top of the page

    (sorry for my english, i am not english native)
    • CommentAuthorKaste
    • CommentTimeMay 21st 2008
     

    the route for /LANG_CODE/:controller... is set automatically. and therefore /es/news and /en/news should work as expected 'out-of-the-box'.

    • CommentAuthordelia
    • CommentTimeMay 22nd 2008
     
    hi kate, thanks for your answer. My problem is that i dont know how to get the actual uri, to change from one language to another.

    If i am in the controller news_controller.php, for example, how i change the locale here in the controller and redirect to the same page?

    thanks
    • CommentAuthorKaste
    • CommentTimeMay 22nd 2008
     

    both, url_for and redirectTo, accept

    array(
        [...] //usual stuff
        'lang'=>...
    )
    
    • CommentAuthordelia
    • CommentTimeMay 22nd 2008
     
    how can i get the controller filename? i have seen there is a function called getControllerName, but returns the classname, not the filename.

    what i exactly want is, from a view get the actual uri, for example, if the url is /es/project_aims/view/1, how can i get this uri in the code view.


    sorry if i am saying is a stupid thing ......
Add your comments
    Username Password
  • Format comments as