code: def get_language(self, language_code, site_id=None):
          
          if language_code is None:
              raise ValueError(get_null_language_error())
  
          if site_id is None:
              site_id = getattr(settings, 'SITE_ID', None)
  
          for lang_dict in self.get(site_id, ()):
              if lang_dict['code'] == language_code:
                  return lang_dict
  
          # no language match, search for variant: fr-ca falls back to fr
          for lang_dict in self.get(site_id, ()):
              if lang_dict['code'].split('-')[0] == language_code.split('-')[0]:
                  return lang_dict
  
          return self['default']
docs: Return the language settings for the current site
  
          This function can be used with other settings variables
          to support modules which create their own variation of the ``PARLER_LANGUAGES`` setting.
          For an example, see :func:`~parler.appsettings.add_default_language_settings`.