A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
One way to do it is in codebehind, here is a simple example, storing the date in "theDate" :-)
string currentCulture = EPiServer.Globalization.GlobalizationSettings.CultureLanguageCode; // fetch the current culture
EPiServer.Globalization.ContentLanguage.Instance.SetCulture("en-US"); // set the culture
string theDate = CurrentPage.Changed.ToShortDateString(); // grab the date
EPiServer.Globalization.ContentLanguage.Instance.SetCulture(currentCulture); // reset culture again
Hi,
I have a site in english and I want to show the dateformat based on culture e.g. en-US (mm/dd/yyyy) and en-GB (dd/mm/yyyy) how can I get this information in EPiServer?
The user is not logged in at this point.
Cheers
Ian