w Docs

Using a custom button

1 min readUpdated November 9, 2026

Any element with data-cls-trigger="modal" opens the language window when clicked, including with Enter and Space when it is focusable:

<button type="button" data-cls-trigger="modal" aria-haspopup="dialog">
    Language
</button>

The language window must be on the page: it is there when the page has any switcher button. Otherwise add CLS_Pro::enqueue_modal(); in your theme, or use a plain link to #cls-modal.

In dropdown mode (Advanced tab), your button opens the dropdown under itself instead.