The way this works violates Drupal's JavaScript principles, which also happen to be widely accepted best practices for using JavaScript. In short, this doesn't work at all with JavaScript disabled, but still displays a non-functioning language chooser, confusing users.
JavaScript should be applied on top of a form that works without JavaScript via standard form submit.
Comments
Comment #1
mohammed j. razemAdded graceful fallback when JavaScript is disabled.
Comment #2
mohammed j. razem