{"action":"created","issue":{"url":"https://api.github.com/repos/i18next/i18next/issues/562","repository_url":"https://api.github.com/repos/i18next/i18next","labels_url":"https://api.github.com/repos/i18next/i18next/issues/562/labels{/name}","comments_url":"https://api.github.com/repos/i18next/i18next/issues/562/comments","events_url":"https://api.github.com/repos/i18next/i18next/issues/562/events","html_url":"https://github.com/i18next/i18next/issues/562","id":133797912,"number":562,"title":"`fetchOne` equivalent?","user":{"login":"mathieumg","id":1624812,"avatar_url":"https://avatars.githubusercontent.com/u/1624812?v=3","gravatar_id":"","url":"https://api.github.com/users/mathieumg","html_url":"https://github.com/mathieumg","followers_url":"https://api.github.com/users/mathieumg/followers","following_url":"https://api.github.com/users/mathieumg/following{/other_user}","gists_url":"https://api.github.com/users/mathieumg/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieumg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieumg/subscriptions","organizations_url":"https://api.github.com/users/mathieumg/orgs","repos_url":"https://api.github.com/users/mathieumg/repos","events_url":"https://api.github.com/users/mathieumg/events{/privacy}","received_events_url":"https://api.github.com/users/mathieumg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-15T19:30:45Z","updated_at":"2016-02-16T11:32:57Z","closed_at":null,"body":"I'm in the process of migrating from v1.11 to v2.1 and I have a hard time figuring out the right backend for the task. This is my v1 code:\r\n\r\n```js\r\ni18n.backend({\r\n  fetchOne: (language, namespace, callback) => {\r\n      // Custom async logic that calls \"callback\" with the fetched keys.\r\n  },\r\n});\r\ni18n.init(i18nextOptions);\r\napp.use(i18n.handle);\r\n```\r\n\r\nNow I reckon the v2 equivalent should look something like:\r\n\r\n```js\r\ni18next\r\n  .use(i18nextMiddleware.LanguageDetector)\r\n  .use(/* the right backend */) \r\n  .init(i18nextOptions);\r\napp.use(i18nextMiddleware.handle(i18next));\r\n```\r\n\r\nWhen looking at the available backends (http://i18next.com/docs/ecosystem/#backends) they all seem too specialized for the task. Does it mean I now have to develop my own `Backend` and pass callback options to the `read` method if I want a \"callback-based\" backend? Otherwise, sorry if I missed something obvious.\r\n\r\nThanks for the great library!\r\n\r\n**Edit:** I realize I have a very similar question for the frontend part, that is, what is the v2 equivalent for `customLoad` in v1?"},"comment":{"url":"https://api.github.com/repos/i18next/i18next/issues/comments/184643889","html_url":"https://github.com/i18next/i18next/issues/562#issuecomment-184643889","issue_url":"https://api.github.com/repos/i18next/i18next/issues/562","id":184643889,"user":{"login":"jamuhl","id":977772,"avatar_url":"https://avatars.githubusercontent.com/u/977772?v=3","gravatar_id":"","url":"https://api.github.com/users/jamuhl","html_url":"https://github.com/jamuhl","followers_url":"https://api.github.com/users/jamuhl/followers","following_url":"https://api.github.com/users/jamuhl/following{/other_user}","gists_url":"https://api.github.com/users/jamuhl/gists{/gist_id}","starred_url":"https://api.github.com/users/jamuhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamuhl/subscriptions","organizations_url":"https://api.github.com/users/jamuhl/orgs","repos_url":"https://api.github.com/users/jamuhl/repos","events_url":"https://api.github.com/users/jamuhl/events{/privacy}","received_events_url":"https://api.github.com/users/jamuhl/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T11:32:57Z","updated_at":"2016-02-16T11:32:57Z","body":"The point is customLoad was more or less replaced by the backend implementation...which was reduced to a customLoad function ;) (and a write for missings if one needs that)...\r\n\r\nso, personally i won't support all the variations of backend, even less all the db backends v1 offered...that's just to much work to be done beside job and family.\r\n\r\nif you plan to publish your backend you can add it here: https://github.com/i18next/i18next.com/blob/master/pages/docs/ecosystem/index.md so others can easily find it."}}