def add_language(self, language): lang = chomp(language, lower=True) if is_language_code(lang) and lang not in self._languages: self._languages.append(lang)
def language_code(code): return is_language_code(code)