class_docstr: Locale implementation using the `gettext` module.
code: def __init__(self, code, translations):
      try:
          # python 2
          self.ngettext = translations.ungettext
          self.gettext = translations.ugettext
      except AttributeError:
          # python 3
          self.ngettext = translations.ngettext
          self.gettext = translations.gettext
      # self.gettext must exist before __init__ is called, since it
      # calls into self.translate
      super(GettextLocale, self).__init__(code, translations)
  
imports: from __future__ import absolute_import, division, print_function
  import codecs
  import csv
  import datetime
  from io import BytesIO
  import numbers
  import os
  import re
  from tornado import escape
  from tornado.log import gen_log
  from tornado.util import PY3
  from tornado._locale_data import LOCALE_NAMES
label_desc: Use image node_id 1 to create a new GettextLocale object from inherited base classes: Locale with example: obj = GettextLocale(code, translations)