2023-03-06 00:22:24 +00:00
// This code selects all elements in the HTML document with the "data-localize" attribute // and applies the jQuery "localize" function to them with the "main" localization file and a path prefix of "lang"
2023-03-04 21:33:26 +00:00
$ ( "[data-localize]" ) . localize ( "main" , { pathPrefix : "lang" } ) ;
2023-03-06 00:22:24 +00:00
// This is a function that changes the language to French by calling the "localize" function with a language code of "fr"
function changeLangFR ( ) { $ ( "[data-localize]" ) . localize ( "main" , { pathPrefix : "lang" , language : "fr" , } ) ;
2023-03-04 21:33:26 +00:00
}
2023-03-06 00:22:24 +00:00
// This is a function that changes the language to English by calling the "localize" function with a language code of "en"
2023-03-04 21:33:26 +00:00
function changeLangEN ( ) {
$ ( "[data-localize]" ) . localize ( "main" , {
pathPrefix : "lang" ,
language : "en" ,
} ) ;
}