Currently I keep the current locale and account id only in global variables. But now I need to embed them in the url's of my backbone application, so the users can copy/ paste the url.
Currently:
/#users
/#documents
/#images
...
Desired:
/#de/32/users
/#de/232/documents
/#de/4452/images
...
I wonder what's the best way to extract and store the current locale and account id from the url before any router processes it. This way I should be able to leave all routers as they are, am I?
Do I have to "hack" this into the routers (something like in https://github.com/documentcloud/backbone/pull/299) or is there any better way?