Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

YannikG/aaot-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARCHIVED

This was a fun little project a long time ago. It's time to say goodbye and archive this repository.

And another Translator with JSON Backend (aaot-json)

Localizer with Jquery and JSON Backend

Setup

Dependencies

  1. JQuery: https://jquery.com/
  2. JS-Cookie: https://github.com/js-cookie/js-cookie

Installation

Download

  1. Download Git Repo
  2. Include Script in your Project

NPM

npm install aaot-json

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

About

Localizer with JQuery and JSON Backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published