code: def normalize_locale(locale):
          
          import re
          match = re.match(r'^[a-z]+', locale.lower())
          if match:
              return match.group()
docs: Normalize locale
          Extracts language code from passed in locale string to be used later
          for dictionaries loading.
  
          :param locale:          string, locale (en, en_US)
          :return:                string, language code