fix handling of languages so that adding a new language in langs.go doesn't break the code