1.0.1 • Published 6 years ago
aaot-json v1.0.1
And another Translator with JSON Backend (aaot-json)
Localizer with Jquery and JSON Backend
Setup
Dependencies
- JQuery: https://jquery.com/
- JS-Cookie: https://github.com/js-cookie/js-cookie
Installation
- Download Git Repo
- Include Script in your Project
How to use
Setup
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;
Run Localizer
localize.setup();
Switch Language
localize.switch("de");
After switching the Language the Script calls automatically localize.setup()
Note
This Script is currently in Development.
not working Things
- Load from a File
1.0.1
6 years ago