Anyway to translate the categories in the searchbox dropdown

Saturday, April 13, 2024 2:03:19 AM
  • 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