Forum Discussion
heavenerp
Leader
Will definitely leverage this. Thanks!
These endpoints and macros are areas I've never worked with before. To everyone that has replied, thanks for the help!
Doug
heavenerp
11 years agoLeader
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
Related Content
- 2 months ago
- 12 months ago
- 10 months ago
- 2 years ago