//
//  Locale+Extensions.swift
//  PadelClub
//
//  Created by Laurent Morvillier on 03/04/2024.
//

import Foundation

extension Locale {
    
    static func countries() -> [String] {
        var countries: [String] = []
        
        for countryCode in Locale.Region.isoRegions {
            if let countryName = Locale.current.localizedString(forRegionCode: countryCode.identifier) {
                countries.append(countryName)
            }
        }
        
        return countries.sorted()
    }
}
