[ajax.js] Fixed boolean values to match PHP implementation

Also fixed syntax in languages.js
[languages.js] Added language change