Skip to content

Internationalization and localization

To set a custom language you can apply default preset. The default preset automatically sets dates and times internationalization.

Additionally, you can modify all the phrases and texts inside the calendar.

All the setting is done inside the locale object inside the ZaptimeConfig.

Preset

Languages use ISO 639-1 standard.

We currently support: English, Spanish, Polish, French, German, Czech, Portuguese, Swedish, Dutch, Italian, Finnish, Romanian.

Your language is missing? Contact us on support@zaptime.app we will add it!

ts
const config = {
  locale: {
    preset: "en",
  },
};

Start day of the week

You can set the start day of the week setting:

ts
const config = {
  locale: {
    startDayOfWeek: "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat",
  },
};

Headers

Name the day shortcuts inside days header

ts
const config = {
    locale: {
         headers: {
            mon: 'Mon',
            tue: 'Tue',
            wed: 'Wed',
            thu: 'Thu',
            fri: 'Fri',
            sat: 'Sat',
            sun: 'Sun',
        };
    }
}

Time zone and hour preferences

ts

const config = {
    locale: {
        hideTimePreferences: true | false;
    }
}

Calendar texts

Additional texts inside basic calendar

ts
const config = {
    locale: {
         texts: {
            introduction: '',
            chooseDate: 'Choose date',
            noTimeSlotAvailable: 'There is no time slot available for chosen month.',
            choosePreferredTime: 'Choose preferred time',
            pickTime: 'Pick time',
        };
    }
}

Confirmation form

Texts inside confirmation form. Other form inputs are set using custom fields

ts

const config = {
    locale: {
        confirmationForm: {
            confirmBooking: 'Confirm booking',
            buttons: {
                confirmBooking: 'Confirm booking',
                goBack: 'Go back',
            },
        };
    }
}

Hide time preferences

When enabled, it hides setting Timezone and picking a time format.

Defaults to false

ts
const config = {
  locale: {
    hideTimePreferences: true | false,
  },
};