views:

79

answers:

1

Hi,

in my app i need to open a website with the corresponding TLD for that country. Lets say google.com, google.de, etc...

But i don't know which country codes the're specifically using in NSLocale's dict. Can i assume that the lowercase version of NSLocaleCountryCode can be appended as TLD?

Regards, Erik

+1  A: 

From Locales Programming Guide:

The region code is defined by ISO 3166-1

ISO 3166-1 is not equivalent to top level domains, at least not in all cases. For instance: .co.uk ≠ GB

On the other hand, there are only six or so exceptions. See the Wikipedia entry.

Nikolai Ruhe
yes i know there are a few that can't be directly mapped but those could be handled separately as you said.
Erik Aigner