Fix ISO 639 languages

This commit is contained in:
Thomas Ricouard 2023-04-25 15:39:17 +02:00
parent 1870b80f4a
commit 8eb9daac3e

View file

@ -8,7 +8,7 @@ public struct Language: Identifiable, Equatable, Hashable {
public let localizedName: String?
public static var allAvailableLanguages: [Language] = Locale.LanguageCode.isoLanguageCodes
.filter { $0.identifier.count == 2 }
.filter { $0.identifier.count <= 3 }
.map { lang in
let nativeLocale = Locale(languageComponents: Locale.Language.Components(languageCode: lang))
return Language(