{"action":"closed","issue":{"url":"https://api.github.com/repos/i18next/jquery-i18next/issues/22","repository_url":"https://api.github.com/repos/i18next/jquery-i18next","labels_url":"https://api.github.com/repos/i18next/jquery-i18next/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/i18next/jquery-i18next/issues/22/comments","events_url":"https://api.github.com/repos/i18next/jquery-i18next/issues/22/events","html_url":"https://github.com/i18next/jquery-i18next/issues/22","id":176211564,"number":22,"title":"Load i18next on framework7 ajax loaded pages","user":{"login":"rogerhnn","id":1373782,"avatar_url":"https://avatars.githubusercontent.com/u/1373782?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerhnn","html_url":"https://github.com/rogerhnn","followers_url":"https://api.github.com/users/rogerhnn/followers","following_url":"https://api.github.com/users/rogerhnn/following{/other_user}","gists_url":"https://api.github.com/users/rogerhnn/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerhnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerhnn/subscriptions","organizations_url":"https://api.github.com/users/rogerhnn/orgs","repos_url":"https://api.github.com/users/rogerhnn/repos","events_url":"https://api.github.com/users/rogerhnn/events{/privacy}","received_events_url":"https://api.github.com/users/rogerhnn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-11T00:13:22Z","updated_at":"2016-09-12T07:30:44Z","closed_at":"2016-09-12T07:30:44Z","body":"I am using i18next jquery version to localize the text. It works on each file if I click the button to change language (using localstorage to save the language option). But If I load another file in the view for example about page, it doesn't work.\r\n\r\nHere is my i18next function with translation (language.js):\r\n\r\n```\r\nvar itemslang = {\r\n    \"en\": {\r\n        \"translation\": {\r\n          /* MENU */\r\n          \"About-Framework7\": \"About-Framework7\",\r\n          \"Welcome-to-Framework7\": \"Welcome-to-Framework7\",\r\n        }\r\n    },\r\n        \"br\": {\r\n        \"translation\": {\r\n          /* MENU */\r\n          \"About-Framework7\": \"Sobre o Framework7\",\r\n          \"Welcome-to-Framework7\": \"Bem Vindo ao Framework7\",\r\n        }\r\n    }\r\n};\r\n\r\n$(document).ready(function() {\r\n    var language = \"en\";\r\n    if (localStorage.getItem(\"language\") != null)\r\n        language = localStorage.getItem(\"language\");\r\n\r\n    i18n.init({\r\n        lng: language,\r\n        resStore: itemslang,\r\n        fallbackLng: \"en\"\r\n    }, function(o) {\r\n        $(document).i18n()\r\n    }), $(\".lang\").click(function() {\r\n        var o = $(this).attr(\"data-lang\");\r\n\r\n        localStorage.setItem(\"language\", o);\r\n\r\n        i18n.init({\r\n            lng: o\r\n        }, function(o) {\r\n            $(document).i18n()\r\n        })\r\n    })\r\n});\r\n```\r\n\r\nCan anyone point me on how to apply the translation on all pages and not just the first?"}}
{"actor":{"display_login":"rogerhnn"}}