Culture in generic handler
Hi,
I need to implement a site to support different lanaguages. Sitefinity handles showing details of items in different languages by redirecting the user to a language specific URL.
In my case, I need to show details of the child items from a dynamic module on the same page without a redirect. So I am making an ajax call to a generic handler to fetch child item details and display on the site. The problem is when the language is changed using the language selector, the custom widget gets proper culture in Thread.CurrentThread.CurrentUICulture but the handler gets the settings from the browser.
Is there a sitefinity setting that can be accessed in the handler to fetch culture and then culture specific details using x.GetString("Title", culture) extension method?
Hello Dee,
What I can suggest based on the information so far is something like this:
Thread.CurrentThread.CurrentCulture =
new
CultureInfo(
"fr"
);
var title = item.GetValue(
"Title"
);