{"action":"created","issue":{"url":"https://api.github.com/repos/yoolab/iron-router-i18n/issues/61","labels_url":"https://api.github.com/repos/yoolab/iron-router-i18n/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/yoolab/iron-router-i18n/issues/61/comments","events_url":"https://api.github.com/repos/yoolab/iron-router-i18n/issues/61/events","html_url":"https://github.com/yoolab/iron-router-i18n/issues/61","id":83344821,"number":61,"title":"problem with iron-router-i18n and spiderable","user":{"login":"SierraGolf","id":1656727,"avatar_url":"https://avatars.githubusercontent.com/u/1656727?v=3","gravatar_id":"","url":"https://api.github.com/users/SierraGolf","html_url":"https://github.com/SierraGolf","followers_url":"https://api.github.com/users/SierraGolf/followers","following_url":"https://api.github.com/users/SierraGolf/following{/other_user}","gists_url":"https://api.github.com/users/SierraGolf/gists{/gist_id}","starred_url":"https://api.github.com/users/SierraGolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SierraGolf/subscriptions","organizations_url":"https://api.github.com/users/SierraGolf/orgs","repos_url":"https://api.github.com/users/SierraGolf/repos","events_url":"https://api.github.com/users/SierraGolf/events{/privacy}","received_events_url":"https://api.github.com/users/SierraGolf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"martinopic","id":1579047,"avatar_url":"https://avatars.githubusercontent.com/u/1579047?v=3","gravatar_id":"","url":"https://api.github.com/users/martinopic","html_url":"https://github.com/martinopic","followers_url":"https://api.github.com/users/martinopic/followers","following_url":"https://api.github.com/users/martinopic/following{/other_user}","gists_url":"https://api.github.com/users/martinopic/gists{/gist_id}","starred_url":"https://api.github.com/users/martinopic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinopic/subscriptions","organizations_url":"https://api.github.com/users/martinopic/orgs","repos_url":"https://api.github.com/users/martinopic/repos","events_url":"https://api.github.com/users/martinopic/events{/privacy}","received_events_url":"https://api.github.com/users/martinopic/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-06-01T06:40:35Z","updated_at":"2015-06-03T18:00:56Z","closed_at":null,"body":"Hi,\r\n\r\nI am having problems bringing together iron-router-i18n with spiderable. If I do not use iron-router-i18n spiderable works as expected. With iron-router-i18n all the language awesomeness works, but I lose the spiderable server-side rendering.\r\n\r\nSo this is what happens:\r\n\r\n1. I call http://localhost:3000/?\\_escaped_fragment\\_=foobar\r\n2. I see \r\n```\r\n Oops, looks like there's no route on the client or the server for url: \"http://localhost:3000/foobar.\"\r\n```\r\n\r\nThis is my configuration:\r\n```javascript\r\nI18NConf.configure({\r\n    defaultLanguage: 'de',\r\n    languages: ['de', 'en'],\r\n    autoConfLanguage: false,\r\n    persistLanguage: false\r\n});\r\n```\r\n\r\nI am using it together with tap:i18n.\r\n\r\nUpon initialisation of my client I do this:\r\n```javascript\r\nMeteor.startup(function () {\r\n    Session.set(\"languageLoading\", true);\r\n});\r\n```\r\n\r\n... and my router.js looks like this:\r\n```javascript\r\nRouter.onBeforeAction(function () {\r\n    TAPi18n.setLanguage(I18NConf.getLanguage()).done(function () {\r\n        Session.set(\"languageLoading\", false);\r\n    });\r\n    this.next();\r\n}, {where: 'server'});\r\n\r\nRouter.map(function () {\r\n    this.route('/', function () {\r\n        this.render('index');\r\n    });\r\n    this.route('/share', function () {\r\n        this.render('share');\r\n    });\r\n});\r\n```\r\n\r\nAm I missing some configuration? \r\nIf the above information is not enough, I can provide an example project to demonstrate the problem."},"comment":{"url":"https://api.github.com/repos/yoolab/iron-router-i18n/issues/comments/108548786","html_url":"https://github.com/yoolab/iron-router-i18n/issues/61#issuecomment-108548786","issue_url":"https://api.github.com/repos/yoolab/iron-router-i18n/issues/61","id":108548786,"user":{"login":"SierraGolf","id":1656727,"avatar_url":"https://avatars.githubusercontent.com/u/1656727?v=3","gravatar_id":"","url":"https://api.github.com/users/SierraGolf","html_url":"https://github.com/SierraGolf","followers_url":"https://api.github.com/users/SierraGolf/followers","following_url":"https://api.github.com/users/SierraGolf/following{/other_user}","gists_url":"https://api.github.com/users/SierraGolf/gists{/gist_id}","starred_url":"https://api.github.com/users/SierraGolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SierraGolf/subscriptions","organizations_url":"https://api.github.com/users/SierraGolf/orgs","repos_url":"https://api.github.com/users/SierraGolf/repos","events_url":"https://api.github.com/users/SierraGolf/events{/privacy}","received_events_url":"https://api.github.com/users/SierraGolf/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T18:00:56Z","updated_at":"2015-06-03T18:00:56Z","body":"Yeah, you are right the example is artificial. To be honest I did not know at the time that there would not be a value for the parameter ```_escaped_fragment_``` and I just put something random there to test the behaviour. Testing with an empty value works as it should and query parameters generally work also as expected. However I did not test with actual hash fragments, because I don't have any (yet). \r\n\r\nAbout the tip with the language change listener. Where is the recommended place to put this? Client, server or both? Btw. I remember now why I did not use it in the first place. In my project the default language for I18nConf is set  to \"de\" and in TAPi18n the default language is hard-coded to \"en\".\r\n\r\nThis means when I call my app with localhost:3000/de I18nConf does not detect a change and does not trigger the listener, but my TAPi18n still defaults to \"en\"."}}