Localizer with Jquery and JSON Backend
- JQuery: https://jquery.com/
- JS-Cookie: https://github.com/js-cookie/js-cookie
- Download Git Repo
- Include Script in your Project
localize.url = "yourapi/translation/&lang&"; // &lang& get replaced by the Script with the language
localize.fallBack = "de";
localize.langSupported = ["en", "de"];
localize.cookieExpires = 3; // Default: 7 (Days)
localize.successCallback = function() {..};
localize.errorCallback = function() {...};
localize.beforeSwitch = function() {...};
localize.debug = true;
localize.setup();
localize.switch("de");
After switching the Language the Script calls automatically localize.setup()
This Script is currently in Development.
- Load from a File