It seems that Microsoft script changes the HTML structure during the translation process. Because of this you have to use delegation: instead of $("#changeLang a").on("click", handler)
you will do $('#changeLang').on("click", "a", handler)
. Also, your code can be simplified:
var lang;
$('#changeLang').on("click", "a", function (e) {
var to = $(this).attr('id');
console.log("Translating from ", lang, " to ", to);
Microsoft.Translator.Widget.Translate(lang, to);
lang = to;
});