---
title: "Content localization options"
description: "These settings configure TinyMCE's language capabilities, including right-to-left support."
canonical_url: "https://www.tiny.cloud/docs/tinymce/latest/content-localization/"
md_url: "https://www.tiny.cloud/docs/tinymce/6/content-localization/index.md"
version: "6"
last_updated: "2022-11-30T01:26:11Z"
tokens: 761
---
Important This page documents TinyMCE 6. For new projects, Tiny recommends using the latest, most up-to-date version. [See TinyMCE 8 documentation](../../latest/content-localization/).
# Content localization options

## Setting the language on content

### `content_langs`

This option sets the languages displayed in the `language` toolbar button and the `language` menu item. The option accepts an array of language specs. Each language spec is a JavaScript object defined using the following properties.

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `title` | String | required | The name shown for this language in the UI. |
| `code` | String | required | The language tag, as defined in [Tags for Identifying Languages (BCP47)](https://www.ietf.org/rfc/bcp/bcp47.txt), for this language. This language tag is placed in the `lang` attribute for elements formatted using this language. |
| `customCode` | String | optional | An alternative language tag, that does not need to be compatible with BCP47. This string is placed in the `data-mce-lang` attribute for elements formatted using this language, if it is defined. |
There is no default value for the `content_langs` option. If no value is specified, the `language` toolbar button and menu item are not available. A default value for this option is provided by the Spell Checker Pro plugin. For information on using the `content_langs` option with the Spell Checker Pro plugin, see: [Spell Checker Pro plugin - `content_langs`](../introduction-to-tiny-spellchecker/#content_langs).

**Type:** `Array`

#### Example: using `content_langs`

```js
tinymce.init({
  selector: 'textarea', // change this according to your HTML
  toolbar: 'language',
  content_langs: [
    { title: 'English', code: 'en' },
    { title: 'Spanish', code: 'es' },
    { title: 'French', code: 'fr' },
    { title: 'German', code: 'de' },
    { title: 'Portuguese', code: 'pt' },
    { title: 'Chinese', code: 'zh' }
  ]
});
```

## Setting the language options for Spell Checker Pro

To set the default language for Spell Checker Pro plugin, see: [The Spell Checker Pro plugin - `spellchecker_language`](../introduction-to-tiny-spellchecker/#spellchecker_language).

To customize the list of spell checking languages available to your users through the Spell Checker Pro plugin, see: [The Spell Checker Pro plugin - `spellchecker_languages`](../introduction-to-tiny-spellchecker/#spellchecker_languages).

## Changing the default text direction of content

### `directionality`

This option allows you to set the base direction of directionally neutral text (i.e., text that doesn’t have inherent directionality as defined in Unicode) within the editor. This is similar to the use of the `'dir'` attribute when using content editable elements by themselves.

**Type:** `String`

**Default value:** `'ltr'`

**Possible values:** `'ltr'`, `'rtl'`

#### Example: using `directionality`

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  directionality: 'ltr'
});
```

## Allow users to change the text direction of content

To allow your users to change the text direction of content as needed, add the toolbar buttons provided by [The Directionality plugin](../directionality/).
