add test and fix for the problem that whitespaces can end up in the language names when user enters them intuitively