{"action":"created","issue":{"url":"https://api.github.com/repos/i18next/i18next-node/issues/173","labels_url":"https://api.github.com/repos/i18next/i18next-node/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/i18next/i18next-node/issues/173/comments","events_url":"https://api.github.com/repos/i18next/i18next-node/issues/173/events","html_url":"https://github.com/i18next/i18next-node/issues/173","id":59850282,"number":173,"title":"Handling unknown languages via addRoute in Express","user":{"login":"luileito","id":1146339,"avatar_url":"https://avatars.githubusercontent.com/u/1146339?v=3","gravatar_id":"","url":"https://api.github.com/users/luileito","html_url":"https://github.com/luileito","followers_url":"https://api.github.com/users/luileito/followers","following_url":"https://api.github.com/users/luileito/following{/other_user}","gists_url":"https://api.github.com/users/luileito/gists{/gist_id}","starred_url":"https://api.github.com/users/luileito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luileito/subscriptions","organizations_url":"https://api.github.com/users/luileito/orgs","repos_url":"https://api.github.com/users/luileito/repos","events_url":"https://api.github.com/users/luileito/events{/privacy}","received_events_url":"https://api.github.com/users/luileito/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-04T19:41:45Z","updated_at":"2015-03-05T16:41:07Z","closed_at":null,"body":"Hi, I'm playing with the SEO-friendly routes in Express. If I preload N langs on init, can `i18n.addRoute` handle routes for non-preloaded langs? It seems not to fall back to the default lang; for instance:\r\n\r\n```javascript\r\nvar allowLangs = ['en', 'es'];\r\ni18n.init({\r\n  lng: allowLangs[0],\r\n  fallbackLng: allowLangs[0],\r\n  preload: allowLangs\r\n}, function onLoad(t){\r\n  i18n.addRoute('/:lng/routes.some', allowLangs, router, 'get', getSomePage);\r\n});\r\n```\r\n\r\nIf the user requests a non-preloaded lang, say `/fr/some`, the route seems not to be available, however I'd expect `getSomePage` to be executed with 'en' as fallback. Is there any option to cope with this issue? Right now I only can think of explicitly defining `router.get('/:lng/some', ...)` in the app. \r\n\r\nThx, \r\nLuis"},"comment":{"url":"https://api.github.com/repos/i18next/i18next-node/issues/comments/77399113","html_url":"https://github.com/i18next/i18next-node/issues/173#issuecomment-77399113","issue_url":"https://api.github.com/repos/i18next/i18next-node/issues/173","id":77399113,"user":{"login":"luileito","id":1146339,"avatar_url":"https://avatars.githubusercontent.com/u/1146339?v=3","gravatar_id":"","url":"https://api.github.com/users/luileito","html_url":"https://github.com/luileito","followers_url":"https://api.github.com/users/luileito/followers","following_url":"https://api.github.com/users/luileito/following{/other_user}","gists_url":"https://api.github.com/users/luileito/gists{/gist_id}","starred_url":"https://api.github.com/users/luileito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luileito/subscriptions","organizations_url":"https://api.github.com/users/luileito/orgs","repos_url":"https://api.github.com/users/luileito/repos","events_url":"https://api.github.com/users/luileito/events{/privacy}","received_events_url":"https://api.github.com/users/luileito/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T16:41:07Z","updated_at":"2015-03-05T16:41:07Z","body":"Ok, thanks for the clarification. I just submitted the PR https://github.com/i18next/i18next-node/pull/174"}}