digitalascetic / iron-router-i18n

Meteor iron router support for i18n
MIT License
36 stars 5 forks source link

Problems with wildcards #80

Open TimoRuetten opened 8 years ago

TimoRuetten commented 8 years ago

When using this package you will have problems when using a wildcard route at first parameter.

Example:

Router.route('/:names*/about', function(){
  this.render('about', {
    data : function () {
      return {
        names : this.params.names.split('/')
      };
    }
  });
}, {
  name : 'about'
});

this.params.names will return for example en/name1/name2 and the language will not be set when going to this route: /en/name1/name2/about.

A fix I could do by myself is always to shift the params.names array and set with the returned value the language. But this would only be a workaround so my question is: Is there any implemented way to solve this problem ?