We are excited to announce that right-to-left text support will soon be enabled as default for everyone!
Previously, developers could turn on RTL text support for an experience by enabling the property RtlTextSupport in StarterGui. Now, with the incoming change, the default value will be set to Enabled. The expected date for this change is
August 14 TBD.
A few updates since our last phase:
New property TextDirection which is an Enum that changes the direction of the paragraph so that the text segments will layout accordingly.
Auto - the direction will be determined by the natural writing direction of the first strong character of this paragraph.
LeftToRight - force the paragraph to layout text segments from left to right.
RightToLeft - force the paragraph to layout text segments from right to left.
If TextDirection is set to Auto, the text in the screenshot will layout from right to left, because the first word is in Arabic. Changing TextDirection to LeftToRight will make the text layout from left to right:
In the RichText tags, bidirectional text now also renders according to the first strong character of the text within the tag.
Note: All tags still render in left-to-right order; for more info, reference our previous post.
To override the direction within a richtext tag, use
<font dir=”ltr”></font>where the dir attribute can be “auto” for Automatic, “ltr” for LeftToRight, “rtl” for RightToLeft.
E.g. The following source text in RichText will show up as:
Numbers now render correctly within RTL text.
Parentheses now render correctly in RTL text.
Punctuation marks now work correctly in RTL text.
[Available Soon] RTL messages won’t overlap with usernames in the legacy chat window anymore.
If you wish to opt-out of this feature, please navigate to Explorer > StarterGui > RtlTextSupport, and turn the value to Disabled.
Please note, the property will eventually be removed as enabled in the future, meaning that you will not be able to disable the property. That said we will ensure this feature will not negatively impact your experience or workflow before getting to that stage.
Don’t hesitate to let us know in the thread about any questions or concerns you may have.
There is an issue with displaying RTL messages in the legacy chat window if you are using a previous version of chat modules.
Go to Explorer > TextChatService, and change the ChatVersion to TextChatService instead of LegacyChatService.
If you are using a previous version of the legacy chat modules in your experience, kindly update your forked modules. To do this, navigate to the Explorer, locate Chat, and update the chat modules with a newer version. If there is no Chat in the Explorer, you will need to go to “MODEL” in the ribbon bar, hit Service, and choose Chat to add to the Explorer. You can either grab the legacy chat modules from a newly created place or use the module files attached here.
FixedLegacyChatModules.rbxm (129.3 KB)
If you have a lot of customized code and prefer not to replace the whole module, and you are using leading spaces in chat messages, a simple solution is to turn on RichText for the chat messages and wrap the leading spaces with rich text tags
We would love to hear if you have any questions, concerns, or feedback regarding this feature.