At first glance it seems to work (even better than our fix), I’ll let you know if I run into any issues.
- update:
so far so good no problems
At first glance it seems to work (even better than our fix), I’ll let you know if I run into any issues.
another massive issue regarding non English languages on Roblox:
When players in our game speak Hebrew in voice chat and get reported, their voice chat privileges are suspended in approximately 90% of cases without breaking any rule, not even an Hebrew word that would sound like a swear word in English was said, so it could be moderators not knowing how to handle voice moderation correctly
I’m not sure if anything can be done, but if you have the ability to reach out to the appropriate individuals regarding this matter, it would be greatly appreciated.
We’ve found that Roblox support hasn’t been able to provide any assistance in resolving this problem, so we just kinda have to live with it, unless you are able to do something…?
Hi, this is probably due to the textLabel here is not set to RichText in the script. Is this a normal public message? There might be something missing in the module script I provided that’s not setting it.
Hi @TheRealRoni972 , did you try reporting this issue in the bug reports section in the devForum? If not, could you please initiate one in the section and see if the team can help resolve it? If so, could you please share the devForum link so I may be able to share it with my co-workers. Thank you.
Hello @OutlookG I posted about it on Massive issue regarding non English languages on Roblox but it didn’t post in the bug report so if you can to forward In #bug-reports? thank you
For some reason I’m not able to open a bug report topic
I feel like adding a new rich text tag (<rtl>content</rtl>
) would be better for this purpose. It seems like there are numerous issues with RTL displaying correctly in chat, this would be a solution.
Hey @CharlieGordonnn , I wanted to bring your attention to an important matter regarding non-English languages on Roblox. I encourage you to read and familiarize yourself with the details I shared on the Roblox Developer Forum in this thread: Link to see
Hi @Myoffice129 , I have internally forwarded your post to the related team and they will work on investigating the issue. Thanks for your patience!
Hi everybody, our phase 2 is announced just now, please check this article around new updates and please leave your feedback there!
Apologies for posting this here, but the phase 2 thread is currently locked.
I’m still really confused about using RTL with RichText. I saw this,
but I don’t understand.
Here’s my English text, followed by how it should appear:
Your friend Bob <font color="#73d3ff">joined</font>
Here is my Arabic text, followed by how it should appear:
صديقك Bob <font color="#73d3ff">انضم</font>
… I think, anyway — I don’t know Arabic, but this is how it appears in my Windows Notepad with Right-to-Left Reading Order enabled:
(raw text: صديقك Bob انضم
)
And here’s the bidirectional Arabic RichText segment in the same Notepad (what a mess this is to read lol):
However, here’s the problem I’m having, in a 2x2 square:
The bidirectional text in the RightToLeft row only renders correctly without RichText. Am I using RichText wrong here? Adding a dir="rtl"
or dir="ltr"
tag doesn’t work for me either.
You can interact with the “punnett square” UI’s using this .rbxm file. (8.7 KB)
Just paste it into StarterGui.
I would really appreciate an answer on this. Thanks in advance!
Hi @GFink , thanks for drafting the detailed report. If I’m understanding it correctly, the rich text is not working as expected here for bidirectional text.
I have tried copy-pasting the example you shared, and yeah I have reproduced the same result as you listed above.
However when I tried crafting it like this:
Source text: <font color="#73d3ff">انضم</font> <font dir="rtl">صديقك Bob</font>
I was able to get an expected result. The breakdown is:
<font color="#73d3ff">انضم</font>
I know this may be very confusing, so please let us know if any point above does not make sense. Hope it works out as expected on your end!
Thanks a ton for responding so soon! I hope this example can answer other readers’ questions as well.
This confused me for a bit until I read your source text closer. When I read “tags layout from left to right” I think of the text used for the tags themselves like stroke
, smallcaps
, font color="#FF0000"
and so on, rather than the text that those tags are encapsulating.
It wouldn’t make much sense to say the tags themselves always go from left-to-right because of course they do, they need to use the standardized English formatting to work
I am assuming that because the text انضم
(‘joined’) is a single word, this is the reason its font
tag doesn’t need a dir="rtl"
attribute (the word itself always renders right to left). That makes sense, but in a scripting context it would make more sense to include that dir="rtl"
attribute in all of the RichText tags modifying RTL text, since often the developer doesn’t know if the text contains one or more words.
The second tag is confusing to me because if the TextLabel’s TextDirection property is already set to RightToLeft, shouldn’t it not matter what order the uncolored text (unmodified by a RichText tag) is in? Roblox should be rendering it right-to-left because of that property, but I suppose RichText makes that property not matter. Or perhaps its the presence of any RichText tags within the string?
Testing does reveal that it’s not necessary in this case, but it does seem to have the minor side effect of removing the space between the Arabic “joined” and the name “Bob”.
Before: <font color="#73d3ff">انضم</font> <font dir="rtl">صديقك Bob</font>
After: <font color="#73d3ff">انضم</font> صديقك Bob
It doesn’t appear I added or removed any spaces,
so it’s curious as to why the ‘after’ print has no gap between those words.
Anyway, I have been trying to figure out the logic behind how to use RichText with bidirectional text for a few hours now and honestly I still do not understand. I’ve gotten it working for my use case by trial and error though, and your post did help with that. It would be nice if there was a tutorial post or video walking through maybe 10 different examples and edge cases though.
Thank you very much for continuing to maintain this thread and answer questions. Are there plans to make better RTL support for RichText and TextChatService? It’s not 100% necessary for my use case but I am curious to see since GUI’s now officially support it with the TextDirection property.
RTL RichText looks fine when it’s on a single line, other than the fact it’s still aligned to the left in TextChatService’s TextLabels.
I included the English translation so you can tell what the message says:
However, when RichText spans multiple lines,
you can see the reader has to start reading from the bottom of each message, like this:
(and the text is still aligned to the left)
Source text:<b><font dir="rtl">השרת</font> <font dir="rtl">את</font> <font dir="rtl"><font color="#ff5555">עזב</font></font> <font face="Ubuntu" weight="heavy" color="#01a2ff">cool guy (@GFink)</font> <font dir="rtl">חברך</font></b>
I changed the text alignment and did some work on the RichText string to make it appear as I want on multiple lines (just for testing). I assume this is what it should look like:
Source text:<b><font face="Ubuntu" weight="heavy" color="#01a2ff">cool guy</font> <font dir="rtl">חברך</font><br/><font dir="rtl">השרת</font> <font dir="rtl">את</font> <font dir="rtl"><font color="#ff5555">עזב</font></font> <font face="Ubuntu" weight="heavy" color="#01a2ff">(@GFink)</font></b>
You aren’t typically supposed to mess with CoreGui, but I did for the sake of the above screenshot. In Studio, you can navigate to the TextLabel and change the TextXAlignment property:
Without RichText, the text seems to concur with my above idea:
Source text:חברך cool guy (@GFink) עזב את השרת
Notepad with Right-to-Left Reading Order enabled also agrees:
TextChatService reproduction steps:
Ensure TextChatService.ChatVersion is set to TextChatService
Set TextChatService.ChatWindowConfiguration.TextSize = 42
Run this in the command bar on the client from a running Solo session:
local text = "חברך cool guy (@GFink) עזב את השרת" -- change this as you wish
game.TextChatService.TextChannels.RBXSystem:DisplaySystemMessage(text)
Here’s what it would look like if RTL/bidirectional text worked perfectly for RichText and TextChatService:
I’m not going to try and make my RTL text work for multi-line strings, but I’m sure it could be done with TextService::GetTextSize
.
Excited to see what new updates will come!
Any plans on this releasing to regular chatting? RTL is especially buggy on it and would be easier to read etc
Thanks for ur continued support!
Thanks for your detailed feedback. We will definitely work on making better RTL support and adding support to other languages too.
We actually had to introduce a new flag to make the legacy chat window to properly display RTL text. The example you have sent is the new chat service, the way it works is: no matter what the paragraph is, it renders like this from left to right
[Name Tag] : [Text]
or multiple lines:
[Name Tag] : [Text2 Text1]
[Text5 Text4 Text3]
The reason it currently works like this is because we haven’t fully support RTL for UI layout. We have future plans to flip layout to display from right to left if a user chooses an RTL language in their settings. At that time I believe our chat will properly render from right to left like this:
[Text2 Text1] :[Name Tag]
[Text5 Text4 Text3]
So I guess for your case, what we really need is a way to control the direction of the rich text tags which we currently do not support.