Anyway to translate the categories in the searchbox dropdown

Friday, April 26, 2024 8:06:31 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