code: function (path, replace, replacement) {
      var _path = path.replace(replace, replacement).replace(new RegExp('/{2,}', 'giu'), '/');
      return _path !== '' ? _path : '/'
    }
docs: Modify the router so that is compatible with locale routing and switching. TODO: Move this helper function to a global helpers object.