config.label_bundle.dateTimeLocale - Initialization - Author API

Author API Initialization

dateTimeLocale

Automatically localizes dates and times.

You would want to use this to perform fine grained customization of the date and time display format.

Examples

// Set the date and time language format to French
var initializationOptions = {
    "config": {
        "label_bundle": {
            "dateTimeLocale": "fr"
        }
    }
};

Values

Attribute path config.label_bundle.dateTimeLocale

Default "en-US"

Type string

Starting from v2025.1.LTS, the value is processed using Intl.DateTimeFormat, replacing the previous use of Moment.js.

From v2025.1.LTS and onwards, the default value of an empty string "" has been replaced with "en-US".

To set the language to French, for example, you can pass in "fr".

To set the region and language to Canadian French, for example, you can pass in "fr-CA".

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.