Fix #4750: It still will switch language if you click the cancel button.

Fix #4750.

It should only change the language and reload the window when the OK button was pressed, since done only means that the dialog was closed, and not that was accepted.