Let's say we want to keep the system in one language only (e.g. en) To make the system clean, we delete all products and pages from another language (pl). We set the def lang to "pl" and delete the mentioned "pl" products and pages. Everything works very fine, the "pl" is already empty, the admin lang is still "en", we forgot that we set earlier the def lang to "pl" and we delete the "pl" language. The end :-) I know where to set it manually to "en" but unexperienced one will look at the screen with error line.
To developer crew: mayby build into deleteLanguage function a check: if the lang to be deleted is a default one, then delete nothing but show a message.
yes i know this problem ... this problem is from a series of "i want to destroy my site" and if someone has this intention then we can't prevent of such things. because of that we don't care this situations. this is very marginal case and if we will predict all such "nonsense" then script will increase its very much.