2023-03-06 00:43:27 +00:00
|
|
|
// this code localizes all elements with a "data-localize" attribute
|
2023-03-04 21:33:26 +00:00
|
|
|
$("[data-localize]").localize("main", { pathPrefix: "lang" });
|
|
|
|
|
2023-03-06 00:43:27 +00:00
|
|
|
// You can also override the language detection and specify a language code. This code defines a function that sets the language to French.
|
2023-03-06 13:13:04 +00:00
|
|
|
function changeLangFR() {
|
|
|
|
$("[data-localize]").localize("main", { pathPrefix: "lang", language: "fr" });
|
|
|
|
}
|
2023-03-06 00:43:27 +00:00
|
|
|
|
|
|
|
// This code defines a function that sets the language to English.
|
2023-03-04 21:33:26 +00:00
|
|
|
function changeLangEN() {
|
2023-03-06 13:13:04 +00:00
|
|
|
$("[data-localize]").localize("main", { pathPrefix: "lang", language: "en" });
|
|
|
|
}
|