Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthordelia
     
    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
     

    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
     
    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
     

    both, url_for and redirectTo, accept

    array(
        [...] //usual stuff
        'lang'=>...
    )
    
    • CommentAuthordelia
     
    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 ......