I have an iOS app where I want to include the user's country (as defined by region) in a text string, e.g. “In Portugal this is …”. For most country names this is easy:
let countryCode = locale.objectForKey(NSLocaleCountryCode) as! String
let countryName = locale.displayNameForKey(NSLocaleCountryCode,
value: countryCode)!
let text = "In \(countryName) this is …"
However, for some country names, the name should be prefixed by “the”, for example “the Netherlands” and “the United States”. Is this information available in NSLocale somehow, or are there other libraries that can help with this?