The locale/culture determines first day of week, month names, day of week names, time and date format and other properties.
Adjusting individual properties
Individual aspects of the locale can be adjusted separately using the following properties:
JavaScript
See also:
- DayPilot.Locale (DayPilot.Locale class represents a locale; this page includes a list of built-in locales)
- DayPilot.Navigator.locale
Example:
<div id="nav"></div> <script> const nav = new DayPilot.Navigator("nav", { // ... locale: "de-de" }); nav.init(); </script>
ASP.NET WebForms
DayPilot will adjust its appearance automatically depending on the Culture set for the current thread.
The Culture can be set at one of the following places:
1. In web.config, configuration/system.web/globalization element, culture attribute.
<configuration> <system.web> <globalization culture="en-US"/> </system.web> </configuration>
2. In aspx page header:
<%@ Page Culture="en-US" %>
3. In the code behind:
protected void Page_Load(object sender, EventArgs e) { Culture = new CultureInfo("da-DK"); }
ASP.NET MVC
DayPilot will adjust its appearance automatically depending on the Culture set for the current thread.
The Culture can be set at one of the following places:
1. In web.config, configuration/system.web/globalization element, culture attribute.
<configuration> <system.web> <globalization culture="en-US"/> </system.web> </configuration>
2. Use Application_BeginRequest in Global.asax.cs
protected void Application_BeginRequest(Object sender, EventArgs e) { Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us"); }