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.