// this code localizes all elements with a "data-localize" attribute $("[data-localize]").localize("main", { pathPrefix: "lang" }); // You can also override the language detection and specify a language code. This code defines a function that sets the language to French. function changeLangFR() { $("[data-localize]").localize("main", { pathPrefix: "lang", language: "fr" }); } // This code defines a function that sets the language to English. function changeLangEN() { $("[data-localize]").localize("main", { pathPrefix: "lang", language: "en" }); }