私はかなり単純なことをしようとしています。
シナリオは次のとおりです。プッシュステート対応のブラウザーでサイト全体がうまく機能しています。サイトは、言語が「実際のページ」であることに基づいて機能します。たとえば、次のようになります。
/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
先に述べたように、それは本当に滑らかで、pushstate とうまく連携します。問題は、ハッシュの代替で同じルーター コードを使用しようとしたときです。
バックボーンのルーターはこれを行いたいようです:
/#/en/whatever/etc = bad because it's not based correctly
/#/ar/whatever/etc = and so on
私がやりたいことは次のとおりです。
/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
しかし、これを実装するためにバックボーンのソースを微調整しないと方法が見つかりません。将来を保証するという理由で本当に必要な場合を除き、backbone.js の変更には反対です。
誰にも考えはありますか?