Variable declarations and assignments happen on multiple lines in the 2nd snippet instead of all being defined at once.
var currentLanguage = "en";
var spanish = "es";
var german = "de";
var english = "en";
vs var currentLanguage = "en", spanish = "es", german = "de", english = "en";
Additionally, "en" is assigned twice. If you're going to take the time to assign the "en" abbreviation into the "english" variable, then you should use it when assigning to "currentLanguage", in my opinion, if only to avoid typos and redundancy. var spanish = "es", german = "de", english = "en", currentLanguage = english;
The "disclaimer" element is accessed using the documentGetElementById DOM call twice. javascript is getting faster, but forcing multiple DOM calls when it's not necessary is bad practice. Ideally, you'd access it once and save it into a reference. document.getElementById("disclaimer").firstChild.nodeValue = response;
var text = encodeURIComponent(document.getElementById("disclaimer").firstChild.nodeValue);
vs var disclaimer = document.getElementById("disclaimer"), text = disclaimer.firstChild.nodeValue;
disclaimer.firstChild.nodeValue = response;
The code formatting is poor and inconsistent, notice an incorrect space after "encodeURIComponent (", but no spaces after "getElementById(" and "getElementsByTagName(". Also notice no indentation anywhere, or line-breaks after the function signatures and opening brackets "{";The code is polluting the global namespace by not being enclosed in its own namespace or perhaps an immediately executed anonymous function.
I'm sure more seasoned JS devs can list some more things wrong with the code, but those are the ones that stood out to me.