parse (Locale::Object)

    # File lib/gettext/locale_object.rb, line 56
        def self.parse(locale_name)
          lang_charset, modifier = locale_name.split(/@/)
          lang, charset = lang_charset.split(/\./)
          language, country, script, variant = lang.gsub(/_/, "-").split('-')
          language = language ? language.downcase : nil
          language = "en" if language == "c" || language == "posix"
          if country
            if country =~ /[A-Z][a-z]+/  #Latn => script
              tmp = script
              script = country
              if tmp =~ /[A-Z]+/ # US => country
                country = tmp
              else
                country = nil
                variant = tmp
              end
            else
              country = country.upcase
              if script !~ /[A-Z][a-z]+/ #Latn => script
                variant = script
                script = nil
              end
            end
          end
          [language, country, charset, script, variant, modifier]
        end