code: def set_language(self, language):
          
          if isinstance(language, str):
              language_obj = languages.getlang(language)
              if language_obj:
                  self.language = language_obj.code
              else:
                  raise TypeError("Language code {} not found".format(language))
          if isinstance(language, languages.Language):
              self.language = language.code
docs: Set self.language to internal lang. repr. code from str or Language object.