guideChanging the language

The language of the CKBox UI can be changed using the language configuration option.

In the example below, CKBox is configured to use Spanish.

CKBox.mount(document.querySelector('#ckbox'), {
    tokenUrl: 'https://your.token.url',
    language: 'es'
});

# CKEditor integration

If you are integrating CKBox with CKEditor, please have a look at the example below, which sets the language to Spanish for both, CKEditor and CKBox simultaneously.
To read more about the integration between CKEditor and CKBox, please refer to the CKEditor integration guide.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <script src="https://cdn.ckeditor.com/ckeditor5/41.3.0/classic/ckeditor.js"></script>
        <script src="https://cdn.ckeditor.com/ckeditor5/41.3.0/super-build/translations/es.js"></script>
        <script src="https://cdn.ckbox.io/ckbox/2.4.0/ckbox.js"></script>
        <script src="https://cdn.ckbox.io/ckbox/2.4.0/translations/es.js"></script>
    </head>
    <body>
        <div id="editor"></div>
        <script>
            ClassicEditor
                .create( document.querySelector( '#editor' ), {
                    language: 'es',
                    ckbox: {
                        tokenUrl: 'https://your.token.url'
                    },
                    toolbar: [ 'ckbox', 'imageUpload', '|', 'heading','|', 'bold', 'italic', '|', 'undo', 'redo' ]
                } )
                .catch( error => {
                    console.error( error );
                } );
        </script>
    </body>
</html>

As you can see in the example above, the language option for CKBox was omitted. This was intentional because by default the language of CKBox will match the language of CKEditor, which has been already set to Spanish. Setting language again in ckbox.language would be superfluous in this case.

Below you can see a live example of the configuration presented above.