{"action":"created","issue":{"url":"https://api.github.com/repos/i18next/jquery-i18next/issues/7","repository_url":"https://api.github.com/repos/i18next/jquery-i18next","labels_url":"https://api.github.com/repos/i18next/jquery-i18next/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/i18next/jquery-i18next/issues/7/comments","events_url":"https://api.github.com/repos/i18next/jquery-i18next/issues/7/events","html_url":"https://github.com/i18next/jquery-i18next/issues/7","id":133190296,"number":7,"title":"upgrading from v1","user":{"login":"prtome","id":11536421,"avatar_url":"https://avatars.githubusercontent.com/u/11536421?v=3","gravatar_id":"","url":"https://api.github.com/users/prtome","html_url":"https://github.com/prtome","followers_url":"https://api.github.com/users/prtome/followers","following_url":"https://api.github.com/users/prtome/following{/other_user}","gists_url":"https://api.github.com/users/prtome/gists{/gist_id}","starred_url":"https://api.github.com/users/prtome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prtome/subscriptions","organizations_url":"https://api.github.com/users/prtome/orgs","repos_url":"https://api.github.com/users/prtome/repos","events_url":"https://api.github.com/users/prtome/events{/privacy}","received_events_url":"https://api.github.com/users/prtome/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-12T09:09:22Z","updated_at":"2016-02-12T18:51:26Z","closed_at":"2016-02-12T18:09:49Z","body":"hello,\r\nI have been using the previous version which called the translations as $.t('key.value')\r\n\r\nI am completely at lost as how do I change these. \r\ndo I understand well that if I was using\r\n<th> $.t('key.value') </th>\r\nI must use \r\n<th data-i18n=\"key.value\"></th> ?\r\n\r\ngiving all headers (or the top div ?) a class and the $(.myclass).localize(); \r\n\r\nI use jQuery.validation and I have additional methods:\r\n$.validator.addMethod('le', function(value, element, param) {\r\n      return this.optional(element) || parseInt(value) <= parseInt($(param).val())\r\n},$.t('invalid_value'));\r\n\r\nHow do I change it there ?\r\n\r\nSorry if this is not the correct place to ask, I am completely lost in how to use this new version vs what I have already coded\r\nThanks for any help or pointers to the docs"},"comment":{"url":"https://api.github.com/repos/i18next/jquery-i18next/issues/comments/183448229","html_url":"https://github.com/i18next/jquery-i18next/issues/7#issuecomment-183448229","issue_url":"https://api.github.com/repos/i18next/jquery-i18next/issues/7","id":183448229,"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-12T18:51:26Z","updated_at":"2016-02-12T18:51:26Z","body":"like said...\r\n\r\n`and from here on, I have all my query/js script. When I need to use the translations, I use $.t('key.value')`\r\n\r\n=> you don't need the jquery-i18next part, only i18next's t function.\r\n\r\nuse the compatibility flags: http://i18next.com/docs/migration/#v1-11-x--v2-0-0-comp\r\n\r\nadd plugins for languageDetection, xhr loading:\r\nhttps://github.com/i18next/i18next-xhr-backend\r\nhttps://github.com/i18next/i18next-browser-languageDetector\r\n\r\nother plugins: http://i18next.com/docs/ecosystem/\r\n\r\nto append t function to jquery:\r\n\r\n```\r\n$.t = function() {\r\n  i18next.t.apply(i18next, arguments);\r\n};\r\n```"}}