def sanitize_available_locales(available_languages)
      available_languages.map do |available|
        available.to_s.split(/[_-]/).reject { |part| part.start_with?("x") }.join("-")
      end
    end
def sanitize_available_locales(available_languages)
      available_languages.map do |available|
        available.to_s.split(/[_-]/).reject { |part| part.start_with?("x") }.join("-")
      end
    end
Returns a supplied list of available locals without any extra application info
 that may be attached to the locale for storage in the application.

 Example:
 [ja_JP-x1, en-US-x4, en_UK-x5, fr-FR-x3] => [ja-JP, en-US, en-UK, fr-FR]