Reputation: 149
So here's the problem...
My app will have a link to buy a product from a global online retailer, however in the UK it will come from "shop.co.uk", in the US "shop.com", Australia "shop.oz.au", etc
How do I set the locale to location rather than language, as they are all English speaking countries?
Many thanks in advance
Rob
Upvotes: 0
Views: 202
Reputation: 5499
using this code you can get the country from the current locale, and with this you can choose the proper URL
NSLocale *currentLocale = [NSLocale currentLocale];
NSString *countryCode = [currentLocale objectForKey:NSLocaleCountryCode];
Upvotes: 1