Hello! How can we change the locale in DateFormatter auotmatic or dynamically? I need to set in English or Spanish depends on the user language...
let formatter = DateFormatter() formatter.dateStyle = .long formatter.locale = Locale(identifier: "es_ES") return formatter.string(from: date)
I’m trying in the simulator in spanish and without the Locale identifier keeps in english, also in real devices.
Thanks!