Sanity Library Reference Docs
    Preparing search index...

    Interface LocaleDefinition

    A locale definition, which describes a locale and its resources.

    interface LocaleDefinition {
        bundles?: (LocaleResourceBundle | ImplicitLocaleResourceBundle)[];
        id: string;
        title: string;
        weekInfo: LocaleWeekInfo;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Array of resource bundles for this locale, if any.

    Generally you'll want to provide some base resources, eg for the studio core namespace, as well as for common namespaces like structure and vision. You can also provide resources for other plugins/namespaces - but preferably the resources should be provided as an async function that imports the resources, in order to lazy load them on use.

    id: string

    The ID of the locale, eg en-US, nb-NO, th-TH

    title: string

    The title of locale, eg English (US), Norsk (bokmål), ไทย

    weekInfo: LocaleWeekInfo

    Week information for this locale. Based on the Intl.Locale['weekInfo'] type.