# LanguageConfig

interface

The configuration of the editor language.

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

See [all editor options](module_core_editor_editorconfig-EditorConfig.md).

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-core/src/editor/editorconfig.ts#L1623)

<a id="properties">

## Properties

<a id="member-content">

### `content?: string`

Allows to use a different language of the editor content.

The language codes are defined in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) standard.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-core/src/editor/editorconfig.ts#L1637)

<a id="member-textPartLanguage">

### `textPartLanguage?: Array<TextPartLanguageOption>`

The available [`TextPartLanguage`](module_language_textpartlanguage-TextPartLanguage.md) options that allow setting the language of parts of the content.

This configuration option is available only with the [text part language feature](language.md) enabled.

Refer to the [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification to learn more.

To change the editor's UI language, refer to the [Setting the UI language](../getting-started/setup/ui-language.md) guide.

The default value is:

```typescript
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](https://en.wikipedia.org/wiki/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.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-language/src/augmentation.ts#L46)

<a id="member-ui">

### `ui?: string`

Allows to use a different language for the editor UI.

The language codes are defined in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) standard.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-core/src/editor/editorconfig.ts#L1630)

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
