It took a bit of tweaking, but I did get it working. Again, thanks so much for your help! Inside the custom component I added an onclick element to the Language links of: <a href="#" onclick="changelanguage('en');">English</a>
<a href="#" onclick="changelanguage('es');">Spanish</a> and at the bottom of the custom component added the tweaked script you provided <script type="text/javascript">
function changelanguage(new_lang_code){
LITHIUM.jQuery.ajax({
type: "GET",
url: "url_to_endpoint/endpoint_name?lang=" + new_lang_code,
dataType: "json",
success: function (data) {
if(data.response == "success"){
window.location.reload();
}else{
return false;
}
}
});
}
</script> Works great! Will be live in our community soon. Doug