Language name in backend can be edited to be empty. This may cause problems in navigation (such as the head navigation language chooser).
If user deletes name of language then use naming convention from newly created languages for new name. Do save an empty language name to be empty.
Steps to reproduce:
Go to Administration -> Languages
Edit name of a language (delete name)
Name of language is empty