Esempio n. 1
0
 /// <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
     }));
 }
Esempio n. 2
0
 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)
     });
 }
Esempio n. 3
0
 public static IISOCountry Localize(this IISOCountry country, CultureInfo culture,
                                    LocalizationSettings localizationSettings)
 {
     LocalizationSettings = localizationSettings;
     return(Localize(country, culture.Name, localizationSettings));
 }