I'm trying to do something pretty simple.
Here's the scenario: I have a whole site working great with pushstate enabled browsers. The site works off the basis that the language is the "actual page" for instance:
/en/whatever/etc = index.en.php with with english headers and encoding & tweaks
/ar/whatever/etc = index.ar.php with with arabic headers and encoding & tweaks
/ru/whatever/etc = index.ru.php with with russian headers and encoding & tweaks
It's really slick and works nicely with pushstate as I mentioned. The problem is when I try to use the same router code with the hash alternative.
Backbone's router seems to want to do this:
/#/en/whatever/etc = bad because it's not based correctly
/#/ar/whatever/etc = and so on
what I want it to do is:
/en/#whatever/etc
/ar/#whatever/etc
/ru/#whatever/etc
..and so on
or even:
/en/#/whatever/etc
/ar/#/whatever/etc
/ru/#/whatever/etc
..and so on
But i can't find a way without tweaking backbones source to implement this. I'm kind of against changing backbone.js unless I really have to because of the futureproofing factor.
Anyone have any thoughts?