{"action":"created","issue":{"url":"https://api.github.com/repos/i18next/i18next-browser-languageDetector/issues/26","repository_url":"https://api.github.com/repos/i18next/i18next-browser-languageDetector","labels_url":"https://api.github.com/repos/i18next/i18next-browser-languageDetector/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/i18next/i18next-browser-languageDetector/issues/26/comments","events_url":"https://api.github.com/repos/i18next/i18next-browser-languageDetector/issues/26/events","html_url":"https://github.com/i18next/i18next-browser-languageDetector/issues/26","id":146002960,"number":26,"title":"Should we check i18next languageOnly option?","user":{"login":"balciseri","id":5262845,"avatar_url":"https://avatars.githubusercontent.com/u/5262845?v=3","gravatar_id":"","url":"https://api.github.com/users/balciseri","html_url":"https://github.com/balciseri","followers_url":"https://api.github.com/users/balciseri/followers","following_url":"https://api.github.com/users/balciseri/following{/other_user}","gists_url":"https://api.github.com/users/balciseri/gists{/gist_id}","starred_url":"https://api.github.com/users/balciseri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balciseri/subscriptions","organizations_url":"https://api.github.com/users/balciseri/orgs","repos_url":"https://api.github.com/users/balciseri/repos","events_url":"https://api.github.com/users/balciseri/events{/privacy}","received_events_url":"https://api.github.com/users/balciseri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-05T14:14:23Z","updated_at":"2016-04-05T14:42:24Z","closed_at":null,"body":"`{\r\n      key: 'detect',\r\n      value: function detect(detectionOrder) {\r\n        var _this = this;\r\n\r\n        if (!detectionOrder) detectionOrder = this.options.order;\r\n\r\n        var detected = [];\r\n        detectionOrder.forEach(function (detectorName) {\r\n          if (_this.detectors[detectorName]) {\r\n            var lookup = _this.detectors[detectorName].lookup(_this.options);\r\n            if (lookup && typeof lookup === 'string') lookup = [lookup];\r\n            if (lookup) detected = detected.concat(lookup);\r\n          }\r\n        });\r\n\r\n        var found = void 0;\r\n        detected.forEach(function (lng) {\r\n          if (found) return;\r\n          var cleanedLng = _this.services.languageUtils.formatLanguageCode(lng);\r\n         if (_this.i18nOptions.load === 'languageOnly') cleanedLng = _this.services.languageUtils.getLanguagePartFromCode(cleanedLng);\r\n          if (_this.services.languageUtils.isWhitelisted(cleanedLng)) found = cleanedLng;\r\n        });\r\n\r\n        return found || this.i18nOptions.fallbackLng[0];\r\n      }\r\n    }`\r\n\r\nWhat do you think about the bold part? Should we add it?\r\n**if (_this.i18nOptions.load === 'languageOnly') cleanedLng = _this.services.languageUtils.getLanguagePartFromCode(cleanedLng);**"},"comment":{"url":"https://api.github.com/repos/i18next/i18next-browser-languageDetector/issues/comments/205838048","html_url":"https://github.com/i18next/i18next-browser-languageDetector/issues/26#issuecomment-205838048","issue_url":"https://api.github.com/repos/i18next/i18next-browser-languageDetector/issues/26","id":205838048,"user":{"login":"balciseri","id":5262845,"avatar_url":"https://avatars.githubusercontent.com/u/5262845?v=3","gravatar_id":"","url":"https://api.github.com/users/balciseri","html_url":"https://github.com/balciseri","followers_url":"https://api.github.com/users/balciseri/followers","following_url":"https://api.github.com/users/balciseri/following{/other_user}","gists_url":"https://api.github.com/users/balciseri/gists{/gist_id}","starred_url":"https://api.github.com/users/balciseri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balciseri/subscriptions","organizations_url":"https://api.github.com/users/balciseri/orgs","repos_url":"https://api.github.com/users/balciseri/repos","events_url":"https://api.github.com/users/balciseri/events{/privacy}","received_events_url":"https://api.github.com/users/balciseri/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T14:42:24Z","updated_at":"2016-04-05T14:42:24Z","body":"Edit: i didn't see the \"s\" in your answer.\r\ni18next.languages is indeed what i am looking for.\r\nThanks again."}}