public async Task <IActionResult> Index() { var planets = await _context.Planets.Include(i => i.Moons).ToListAsync(); planets = _localizer.Localize <Planet>(planets).ToList(); return(View(planets)); }
public void OnGet() { Books = _dbContext.Books.ToList(); Books = _objectLocalizer.Localize <Book>(Books).ToList(); ViewData["Message"] = _htmlLocalizer["Html Yerelleştirme : <b>Merhaba</b><i> {0}</i>", "Ayaz Duru"]; }
public static T Localize <T>(this T item, IObjectLocalizer localizer, LocalizationDepth depth = LocalizationDepth.Shallow) where T : class, ILocalizable { return(localizer.Localize(item, depth)); }
public void Shallow() { _localizer.Localize(_planets, "en", LocalizationDepth.Shallow).Consume(_consumer); }
public static IEnumerable <T> Localize <T>(this IEnumerable <T> items, IObjectLocalizer localizer, LocalizationDepth depth = LocalizationDepth.Shallow) where T : class, ILocalizable { return(localizer.Localize(items, depth)); }