check default and alt language are valid when saving them

make sure these are languages we recognize and if not display an error
otherwise bits of the language code won't work