class_docstr: Object representing a locale.
  
  After calling one of `load_translations` or `load_gettext_translations`,
  call `get` or `get_closest` to get a Locale object.
code: def __init__(self, code, translations):
      self.code = code
      self.name = LOCALE_NAMES.get(code, {}).get("name", "Unknown")
      self.rtl = False
      for prefix in ["fa", "ar", "he"]:
          if self.code.startswith(prefix):
              self.rtl = True
              break
      self.translations = translations
  
      # Initialize strings for date formatting
      _ = self.translate
      self._months = [
          _("January"),
          _("February"),
          _("March"),
          _("April"),
          _("May"),
          _("June"),
          _("July"),
          _("August"),
          _("September"),
          _("October"),
          _("November"),
          _("December"),
      ]
      self._weekdays = [
          _("Monday"),
          _("Tuesday"),
          _("Wednesday"),
          _("Thursday"),
          _("Friday"),
          _("Saturday"),
          _("Sunday"),
      ]
  
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 3 to create a new Locale object from inherited base classes: object with example: obj = Locale(code, translations)