code: def gettext(self, singular, plural=None, n=1, locale=None) -> str:
          
          if locale is None:
              locale = self.ctx_locale.get()
  
          if locale not in self.locales:
              if n is 1:
                  return singular
              else:
                  return plural
  
          translator = self.locales[locale]
  
          if plural is None:
              return translator.gettext(singular)
          else:
              return translator.ngettext(singular, plural, n)
docs: Get text
  
          :param singular:
          :param plural:
          :param n:
          :param locale:
          :return: