/// <summary> /// Gets single localized country object /// </summary> /// <param name="country"></param> /// <returns></returns> private static IISOCountry GetLocalizedCountrySingle(IISOCountry country) { return(country.Localize(SingleLanguage, new LocalizationSettings() { CacheLength = new TimeSpan(0, 0, 1, 0), CacheMode = Enums.CacheMode.Cache })); }
public static IISOCountry Localize(this IISOCountry country, string culture, LocalizationSettings localizationSettings) { LocalizationSettings = localizationSettings; return(new ISOCountry { Alpha2 = country.Alpha2, Alpha3 = country.Alpha3, Numeric = country.Numeric, CountryName = GetCountryNameFromIsoCode(country.Alpha2, culture) }); }
public static IISOCountry Localize(this IISOCountry country, CultureInfo culture, LocalizationSettings localizationSettings) { LocalizationSettings = localizationSettings; return(Localize(country, culture.Name, localizationSettings)); }