Interface

LanguageConfig (core/editor)

@ckeditor/ckeditor5-core/src/editor/editorconfig

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 );
	} );

See all editor options.

Filtering

Properties

  • content : string | undefined

    Allows to use a different language of the editor content.

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

  • textPartLanguage : Array<TextPartLanguageOption> | undefined

    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' }
    ];
    

    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.

  • ui : string | undefined

    Allows to use a different language for the editor UI.

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