Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get country tld

Tags:

c++

c

winapi

How do I programmatically get the system country tld. In the registry there's a key called sCountry which has the country's name, but in the system language, eg. If the user has the Spanish version sCountry would be Espana, German version would be Deutschland, etc.

like image 239
Pete Sampras Avatar asked Dec 31 '25 04:12

Pete Sampras


1 Answers

Wikipedia says that the country-code TLDs are based on ISO 3166 with a few exceptions, so presumably GetLocaleInfo with an LCTYPE of LOCALE_SISO3166CTRYNAME would be useful for this. Oh, but you said that.

Why do you need this, anyway, if you don't mind my asking?

like image 199
SamB Avatar answered Jan 02 '26 18:01

SamB