Sign up (with export icon)

LanguageConfig

Api-interface icon interface

The configuration of the editor language.

ClassicEditor
	.create( document.querySelector( '#editor' ), {
		language: ... // The editor language configuration.
	} )
	.then( editor => {
		console.log( editor );
	} )
	.catch( error => {
		console.error( error );
	} );
Copy code

See all editor options.

Properties

  • Chevron-right icon

    content : string | undefined

    Allows to use a different language of the editor content.

    The language codes are defined in the ISO 639-1 standard.

  • Chevron-right icon

    The available TextPartLanguage options that allow setting the language of parts of the content.

    This configuration option is available only with the text part language feature enabled.

    Refer to the WCAG 3.1.2 Language of Parts specification to learn more.

    To change the editor's UI language, refer to the Setting the UI language guide.

    The default value is:

    const config = [
    	{ title: 'Arabic', languageCode: 'ar' },
    	{ title: 'French', languageCode: 'fr' },
    	{ title: 'Spanish', languageCode: 'es' }
    ];
    
    Copy code

    The title property will be used by the text part language dropdown to render available options.

    The languageCode property is used for the lang attribute in the ISO 639-1 format.

    You can also specify the optional textDirection property indicating the reading direction of the language. Correct values are ltr and rtl. When the textDirection property is missing, the text part language feature will specify the text direction by itself.

  • Chevron-right icon

    ui : string | undefined

    Allows to use a different language for the editor UI.

    The language codes are defined in the ISO 639-1 standard.