I want my app when it is accessed by URL http://app.domain/{language}
I if set browser's address line is changed (manually or with code) to http://app.domain/de language shroud be set to "de" without page reload.
But this doesn't work (page is reloaded when I change address line) for me with such code:
- $(function(){
- new (can.Control({
- '/:lang route': function(route){
- setLanguage(route.lang)
- }
- }))(document.body)
- can.route.ready()
- })
What am I doing wrong?