Globalization in JavaScript Block Editor
Globalization enables applications to adapt to different cultures and languages. The Syncfusion Block Editor supports localization and right-to-left (RTL) layouts, allowing you to serve users from diverse linguistic backgrounds.
Localization
Localize the Block Editor for any culture by translating its static text labels. The default locale is en (English). The following table lists the default text values for the en culture that can be translated.
| KEY | Text |
|---|---|
paragraph |
Write something or ‘/’ for commands. |
heading1 |
Heading 1 |
heading2 |
Heading 2 |
heading3 |
Heading 3 |
heading4 |
Heading 4 |
collapsibleParagraph |
Collapsible Paragraph |
collapsibleHeading1 |
Collapsible Heading 1 |
collapsibleHeading2 |
Collapsible Heading 2 |
collapsibleHeading3 |
Collapsible Heading 3 |
collapsibleHeading4 |
Collapsible Heading 4 |
bulletList |
Add item |
numberedList |
Add item |
checklist |
Todo |
callout |
Write a callout |
addIconTooltip |
Click to insert below |
dragIconTooltipActionMenu |
Click to open |
dragIconTooltip |
(Hold to drag) |
insertLink |
Insert Link |
linkText |
Text |
linkTextPlaceholder |
Link text |
linkUrl |
URL |
linkUrlPlaceholder |
https://example.com |
linkTitle |
Title |
linkTitlePlaceholder |
Link title |
linkOpenInNewWindow |
Open in new window |
linkInsert |
Insert |
linkRemove |
Remove |
linkCancel |
Cancel |
codeCopyTooltip |
Copy code |
The example below shows how to add the German culture locale (de-DE).
RTL
The Block Editor supports Right-to-Left (RTL) mode, which reverses the layout of the control to accommodate languages read from right to left, such as Arabic, Hebrew, and Persian. When enabled, icons, toolbars, and text alignment are automatically mirrored to support RTL languages. Enable RTL by setting the enableRtl property to true.
const editor = new BlockEditor({
enableRtl: true
});