Anyway to translate the categories in the searchbox dropdown

Monday, November 25, 2024 3:44:53 PM
  • Posted: Wednesday, October 26, 2022 8:54 PM
  • 13
The dropdown in searchbox does not take the translation. anyway to fix this?

    if (searchbocategories.Any())
                {
                    availableCategories.Add(new SelectListItem { Text = _translationService.GetResource("Common.All"), Value = "" });
                    foreach (var s in searchbocategories)
                        availableCategories.Add(new SelectListItem { Text = s.Name, Value = s.Id.ToString() });
                }
0
back to top
Filters