> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Rich Text and localization

> How to localize and render right-to-left strings with the Rich Text editor | Localization behavior | Rendering in the view

## Localization behavior

As with every other field type, the Rich Text editor is localizable and behaves the same way in both the web app and the API.

## Right to left direction

For languages that support right to left direction like Arabic, Hebrew, or Chinese the Rich Text editor supports bidirectional editing out of the box.\
Following is an example with mixed languages:

![Rich text right to left direction](/developers/docs/_fern-files/contentful.docs.buildwithfern.com/2360f3a288460dec15f9381f512d2e4041b0768e1d86b7a3d1d7782ac23bee39/docs/assets/images/rich-text-ltr-rtl.png)

## Rendering in the view

In order to render mixed directions in your application's view, you can use a library that detects the direction of the language based on the unicode characters, like [this one](https://github.com/wooorm/direction):

```js
var direction = require('direction');

direction('A'); // => 'ltr'
direction('anglais'); // => 'ltr'
direction('بسيطة'); // => 'rtl'
direction('@'); // => 'neutral'
```

By combining it with one of the rich-text [rendering libraries](https://github.com/contentful/rich-text) you can control the direction of the node's text, even in inline elements.