skip to Main Content

how to localize a picker to another language? – Ios swift

@State var selectedSpace : FreeSpace = .Big_Bag Picker("", selection: $selectedSpace) { ForEach(FreeSpace.allCases) { FreeSpace in Text(FreeSpace.rawValue.capitalized) } }.environment(.locale, Locale.init(identifier: "az-Arab")) .foregroundColor(Color("Color")) .padding(.trailing) Knowing that the pickerValues enum FreeSpace: String, CaseIterable, Identifiable { case Big_Bag, Small_Bag var id: Self { self…

VIEW QUESTION
Back To Top
Search