public string GetCountryTranslatedName(Alpha2Code alpha2Code, string languageCode) { if (Enum.TryParse(languageCode, true, out LanguageCode code)) { return(this.GetCountryTranslatedName(alpha2Code, code)); } return(null); }
public ICountryInfo GetCountry(Alpha2Code alpha2Code) { if (this._alpha2Code2CountryInfo.TryGetValue(alpha2Code, out ICountryInfo countryInfo)) { return(countryInfo); } return(null); }
public Country(string name, Alpha2Code alpha2Code, Alpha3Code alpha3Code, short numericCode, Region region, string subRegion) { Name = name; Alpha2Code = alpha2Code; Alpha3Code = alpha3Code; NumericCode = numericCode; Region = region; SubRegion = subRegion; }
public ICountryTranslation GetCountryTranslation(Alpha2Code alpha2Code) { if (this._alpha2Code2CountryTranslation.TryGetValue(alpha2Code, out ICountryTranslation countryTranslation)) { return(countryTranslation); } return(null); }
public string GetCountryTranslatedName(Alpha2Code alpha2Code, CultureInfo culture, LanguageCode defaultLanguageCode) { var name = this.GetCountryTranslatedName(alpha2Code, culture); if (string.IsNullOrWhiteSpace(name) == true) { name = this.GetCountryTranslatedName(alpha2Code, defaultLanguageCode); } return(name); }
public string GetCountryTranslatedName(Alpha2Code alpha2Code, CultureInfo culture) { return(this.GetCountryTranslatedName(alpha2Code, culture.TwoLetterISOLanguageName)); }
public string GetCountryTranslatedName(Alpha2Code alpha2Code, LanguageCode languageCode) { return(this.GetCountryTranslatedName(GetCountry(alpha2Code), languageCode)); }
public string GetCountryTranslatedName(Alpha2Code alpha2Code, LanguageCode languageCode) { var countryInfo = this._countryProvider.GetCountry(alpha2Code); return(this.GetCountryTranslatedName(countryInfo, languageCode)); }