1

I'm trying to find a country's name in its main language, using Locale.

I am not talking about the iPhone's language, but the language that's mainly spoken in that country.

Let's say I get name of Spain thanks to Locale, like that:

let spain = Locale.current.localizedString(forRegionCode: "ES")
print(spain)

If my iPhone is set up in English, I'll see:

Spain

What I want is the Spanish name of Spain (España):

España

Is there a way to achieve that?

Randy
  • 4,335
  • 3
  • 30
  • 64

0 Answers0