Query form description of form using current culture
Hi,
I have created a mvc form in two languages in Sitefinity backend (Sitefinity 9.1). Now i need to create a mvc custom widget in visual studio. I want to display the form description based on the current culture in the front end.
var currentCulture = Thread.CurrentThread.CurrentUICulture.Name;
var formManager = FormsManager.GetManager();
return formManager.GetForms().Where(f => f.Name == FormName && f.AvailableCultures.Contains(new CultureInfo(currentCulture))).SingleOrDefault();
But its throwing error saying parameter not found.
Please help.