public static string GetCurrentCountryName() { var name = App.Locator.DeviceService.CountryCode(); if (name.ToLower() == "usa") { name = "United States of America"; } var country = ISO3166.FromAlpha2(name); if (country != null) { return(country.Name); } return("United States of America"); }
public static string GetCurrentCallingCode() { var name = App.Locator.DeviceService.CountryCode(); var country = ISO3166.FromAlpha2(name); if (country != null) { return("+" + country.DialCodes[0]); } else { country = ISO3166.FromAlpha3(name); if (country != null) { return("+" + country.DialCodes[0]); } } return("+1"); }