Contribute to this guide

Setting the UI language

You can change the language of the editor’s UI. On top of 41 fully translated languages (including 38 professional translations), there are many other languages covered by community translators.

# Demo

See the demo of the editor in Spanish:

Un lenguaje (del provenzal lenguatge y este del latín lingua) es un sistema de comunicación estructurado para el que existe un contexto de uso y ciertos principios combinatorios formales. Existen contextos tanto naturales como artificiales.

Source: Wikipedia

All demos in this guide only present a limited set of features for clarity. Visit the feature-rich editor example to see more in action.

If you are interested in creating features that can be localized, check out the localization guide.

# Right–to–left (RTL) languages support

CKEditor 5 supports right–to–left languages out–of–the–box. When one of RTL languages is used, the WYSIWYG editor adapts its UI for the best editing experience, for instance, mirroring various elements like toolbars, dropdowns, buttons, etc.

# Demo

See the demo of the editor in Arabic:

لغة

اللغة نسق من الإشارات والرموز، يشكل أداة من أدوات المعرفة، وتعتبر اللغة أهم وسائل التفاهم والاحتكاك بين أفراد المجتمع في جميع ميادين الحياة. وبدون اللغة يتعذر نشاط الناس المعرفي. وترتبط اللغة بالتفكير ارتباطًا وثيقًا؛ فأفكار الإنسان تصاغ دومًا في قالب لغوي، حتى في حال تفكيره الباطني. ومن خلال اللغة فقط تحصل الفكرة على وجودها الواقعي. كما ترمز اللغة إلى الأشياء المنعكسة فيها.

Source: Wikipedia

If you want to change the language of the content only (different languages for the UI and the content), check out the Setting the language of the content section to learn more.

We are doing our best to deliver the best RTL support to our users and we constantly improve the editor. Check out the RTL support issue on GitHub to learn more and stay up–to–date. Your feedback is much appreciated!

# Loading additional languages from npm or CDN

By default, the editor will display in American English. This is the language built into the ckeditor.js files. To change the language of the editor UI, you need to load additional language file(s). Check out the following sections to see how to do that:

# npm

After installing the editor from npm, translations can be imported from ckeditor5/translations/[lang].js and must be passed to the editor configuration.

For example, to use Polish, import 'ckeditor5/translations/pl.js' and pass the translation object to the editor configuration. Please note that if you use premium features, you need to separately import their translations from the proper package.

import { ClassicEditor, Essentials, Paragraph, Bold, Italic } from 'ckeditor5';
import { TableOfContents } from 'ckeditor5-premium-features';

import coreTranslations from 'ckeditor5/translations/pl.js';
import premiumFeaturesTranslations from 'ckeditor5-premium-features/translations/pl.js';

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        licenseKey: '<YOUR_LICENSE_KEY>', // Or 'GPL'.
        plugins: [
            Essentials,
            Paragraph,
            Bold,
            Italic,
            TableOfContents
        ],
        toolbar: {
            items: [ 'undo', 'redo', 'bold', 'italic', 'tableOfContents' ]
        },
        translations: [
            coreTranslations,
            premiumFeaturesTranslations
        ]
    } )
    .then( /* ... */ )
    .catch( /* ... */ );

See the npm installation guide for more information.

# CDN

Load translation scripts alongside editor scripts to use the editor with a language different than English. Note that you do not need to pass the translations to the configuration. The editor from CDN will automatically load translations from the attached scripts.

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>CKEditor 5 - Quick start CDN</title>

        <link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/44.1.0/ckeditor5.css">
        <link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5-premium-features/44.1.0/ckeditor5-premium-features.css">
        <!-- Scripts with translations -->
        <script src="https://cdn.ckeditor.com/ckeditor5/44.1.0/translations/es.umd.js"></script>
        <script src="https://cdn.ckeditor.com/ckeditor5-premium-features/44.1.0/translations/es.umd.js"></script>

        <script src="https://cdn.ckeditor.com/ckeditor5/44.1.0/ckeditor5.umd.js"></script>
        <script src="https://cdn.ckeditor.com/ckeditor5-premium-features/44.1.0/ckeditor5-premium-features.umd.js"></script>
    </head>
    <body>
        <div id="editor"></div>    

        <script>
            const { ClassicEditor, Essentials, Paragraph, Bold, Italic } = CKEDITOR;
            const { TableOfContents } = CKEDITOR_PREMIUM_FEATURES;

            ClassicEditor
                .create( document.querySelector( '#editor' ), {
                    licenseKey: '<YOUR_LICENSE_KEY>',
                    plugins: [
                        Essentials,
                        Paragraph,
                        Bold,
                        Italic
                    ],
                    toolbar: {
                        items: [ 'undo', 'redo', 'bold', 'italic', 'tableOfContents' ]
                    }
                } )
                .then( /* ... */ )
                .catch( /* ... */ );
        </script>
    </body>
</html>

See the CDN installation guide for more information.

# Setting the language of the content

In CKEditor 5 you can separately configure the language of the UI and the language of the content. This means you can use the English UI of the editor but type your content in Arabic or Hebrew. The language of the content has an impact on the editing experience, for instance it affects screen readers and spell checkers. It is also particularly useful for typing in certain languages (like right–to–left ones) because it changes the default alignment of the text.

Configure config.language to change the language of the content. In this example, the UI of the editor will be in English but the content will be in Arabic:

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        // ... Other con figuration options ...
        language: {
            // The UI will be English.
            ui: 'en',

            // But the content will be edited in Arabic.
            content: 'ar'
        }
    } )
    .then( editor => {
        window.editor = editor;
    } )
    .catch( err => {
        console.error( err.stack );
    } );

# Demo

لغة

اللغة نسق من الإشارات والرموز، يشكل أداة من أدوات المعرفة، وتعتبر اللغة أهم وسائل التفاهم والاحتكاك بين أفراد المجتمع في جميع ميادين الحياة. وبدون اللغة يتعذر نشاط الناس المعرفي. وترتبط اللغة بالتفكير ارتباطًا وثيقًا؛ فأفكار الإنسان تصاغ دومًا في قالب لغوي، حتى في حال تفكيره الباطني. ومن خلال اللغة فقط تحصل الفكرة على وجودها الواقعي. كما ترمز اللغة إلى الأشياء المنعكسة فيها.

Source: Wikipedia

If you are unsure about the language that the content will be typed in, do not set it. The language of the content will then be inherited from the language of the UI.

You can also employ the text part language feature to produce multi-language content.

# List of available professional translations

Arabic Bengali Bulgarian Catalan
Chinese (China) Chinese (Taiwan) Czech Danish
Dutch English (American) Estonian Finnish
French German Greek Hebrew
Hindi Hungarian Indonesian Italian
Japanese Korean Latvian Lithuanian
Malay Norwegian Polish Portuguese (Brazilian)
Portuguese Romanian Russian Serbian
Slovak Spanish Swedish Thai
Turkish Ukrainian Vietnamese  

There are community translations available for Australian and British variations of English, too, as well as various others.

You can help translating CKEditor 5 into your native language. You do not need to be a programmer to contribute to the project. Your help will be much appreciated!

Other features that will help you control the content language:

  • Text part Language – Set the language of the selected content part to support multilingual texts.