public void LanguageEntityIsIdentifiedLCID()
        {
            LocalizationConfig.RegisterLocalizationEntity <Language>(l => l.LCID);
            LocalizationConfig.RegisterCultureMapper(c => c.LCID);

            var beerCategory = GetCategories()
                               .Where(c => c.Id == 1)
                               .Select(c => new { ID = c.Id, Name = c.Name })
                               .Localize()
                               .First();

            Assert.AreEqual("Bières", beerCategory.Name);
        }
Пример #2
0
 public static void Setup(TestContext ctx)
 {
     LocalizationConfig.RegisterLocalizationEntity <Language>(l => l.IsoCode);
     LocalizationConfig.RegisterLocalizationProvider(DefaultTestCulture);
     LocalizationConfig.RegisterCultureMapper(c => c.TwoLetterISOLanguageName);
 }
 public static void Setup(TestContext ctx)
 {
     LocalizationConfig.RegisterLocalizationEntity <Language>(l => l.IsoCode);
     LocalizationConfig.RegisterLocalizationProvider(DefaultTestCulture);
 }