Default Texts

Splide allows you to modify all texts used in the carousel. For the sake of accessibility, I highly recommend translating these default texts:

KeyTextDescription
prevPrevious slidearia-label of a previous arrow
nextNext slidearia-label of a next arrow
firstGo to first slidearia-label of a previous arrow
lastGo to last slidearia-label of a next arrow
slideXGo to slide %saria-label of pagination or each navigation slide
pageXGo to page %saria-label of pagination
playStart autoplayaria-label of a toggle button
pausePause autoplayaria-label of a toggle button
carouselcarouselaria-roledescription of a root element
selectSelect a slide to showaria-label of pagination
slideslidearia-roledescription of each slide
slideLabel%s of %saria-label of each slide as {slide number} of {slide length}

The aria-roledescription attribute is used for a non-interactive element to define a human-readable text for assistive technologies.

Modifying Texts

To change the default texts, pass an object to the i18n option, and Splide merges them into the default collection:

new Splide( '#splide', {
i18n: {
prev: 'Previous slide',
next: 'Next slide',
}
} );
JavaScript

If you have multiple carousels, you can use Splide.defaults property to set these text at once:

Splide.defaults = {
i18n: {
prev: 'Previous slide',
next: 'Next slide',
},
};
JavaScript

However, it's better to use more content-based texts if possible. For example, when viewing a list of articles, "Move to next article" is more appropriate than "Move to next slide".