zewa666 / aurelia-i18next

An Aurelia-Wrapper for the i18next library
MIT License
17 stars 15 forks source link

Router translation support #10

Open zewa666 opened 9 years ago

zewa666 commented 9 years ago

@bryanrsmith talked to you on private gitter about the help for this issue. We need to figure out the best approach to make existing routes translatable. So far my idea was to create duplicates of existing routes but that would create some issues with custom elements like the nav-bar, where you'd have additional logic to check when to show what version of the route.

So there might be a better approach to this. Potentially something along a custom navigation provider, which would check additional properties of the route.

Here are the community feature requests (from the Wiki https://github.com/aurelia/framework/wiki/Ideas-for-an-i18n-module):

Additionally I'm not sure how much of that should be part of the router itself and what belongs to the plugin. So I've added you as collaborator in case you need to try out things and modify stuff.

bryanrsmith commented 9 years ago

Cool! I'll give it some thought and try to take a closer look soon. I think it'd be good to try to keep as much of this out of the router as possible, and instead try to make it more flexible and extensible to allow the plugin to provide the customized behavior.

Couple random thoughts...

zewa666 commented 9 years ago

@bryanrsmith you had any chance to look at this?

bryanrsmith commented 9 years ago

Unfortunately not. I had just started to look at implementing optional route parameters, but haven't written any code yet. There has been a steady stream of fairly important router issues that have been occupying all my time. At this point I'm not sure when I'll be able to get to it-- it'll probably take me a few weeks to get through the current high-priority router cases.