code: def get_translations(self, domain=None, locale=None):
          
          if locale is None:
  
              if self.locale is None:
                  return support.NullTranslations()
  
              locale = self.locale
  
          if domain is None:
              domain = self.cfg.domain
  
          if (domain, locale.language) not in self.translations:
              translations = None
              for locales_dir in reversed(self.cfg.locales_dirs):
                  trans = support.Translations.load(
                      locales_dir, locales=locale, domain=domain)
                  if translations:
                      translations._catalog.update(trans._catalog)
                  else:
                      translations = trans
  
              self.translations[(domain, locale.language)] = translations
  
          return self.translations[(domain, locale.language)]
docs: Load translations for given or configuration domain.
  
          :param domain: Messages domain (str)
          :param locale: Locale object