Right-to-left Text Support

Actually I have tried adding an extra tag for example
"<b>"..string.rep(" ", numNeededSpaces).."</b>" to the leading spaces of the chat messages which worked but is just a bit hacky.

Where should I place this line of code? Additional details would be beneficial.

  • UPDATE
    After discussing the problem with Arabic game developers and myself (the issue occurs with all languages writted from right to left), a Hebrew game developer, we have came to the conclusion that to fix the issue (for us game developers who has no access to modify the RTL feature), we suggest disabling the Right-to-Left (RTL) feature and enabling the Arial font (which has a lot more issues but less noticeable ones although they’re quite annoying). However, this means the feature becomes useless.
    To fix the RTL feature, we have two ideas. One option is to modify it so that it doesn’t affect the chat functionality, specifically the chat window in the legacytextservice. Although you mentioned it might not be simple to do, an alternative is to automatically add default scripts to the chat service that can handle and resolve the problem automatically. This way, the feature will work smoothly without any issues.

Hi @lliliililililillliii , thanks for the updates! I understand that this issue blocks us from using the feature so we are working on exploring more alternative solutions to it. I have some questions for you and all RTL developers -

  • Did most of you fork the chat scripts and made a lot of customization to them?
  • Is it hard to switch to use the new chat service and customize the hot key?
  • If we are to fix it by pushing new changes to the legacy chat scripts, will that work?
    Thank you!
1 Like

I will answer your questions:

  • First question:
    I encountered the issue without even needing to fork or modify the chat. Here are the steps I followed to reproduce the problem:
  1. Set the chat to the legacy chat service.
  2. Enable the RTL (Right-to-Left) feature. By doing this, the problem occurs when I chat using an RTL language.
    image

image


  • Second question:
    It is not difficult to change the hotkey, but there are complications associated with it. For instance, if I were to change it to ‘q,’ it would remain ‘q’ for both English and Hebrew. However, everyone already got used to ‘/’ for English and ‘q’ for Hebrew since its been like that for years. Additionally, the new chat service has a visually unappealing design, occupying a significant portion of the screen. Players who have encountered similar implementations in other games are aware of its drawbacks, which may negatively affect their perception of our game.

  • Third question:
    If the issue can be resolved by implementing changes exclusively to the legacy chat scripts without altering the bubble chat, which is already functioning perfectly, then I believe it would effectively address the problem.



  • update:

attention CharlieGordonnn!

after countless days encountering the chat issue, I’m excited to announce we have developed a fix that addresses the problem! and it supports most if not all right to left written languages.

here are the steps to install it:

  1. fork the chat scripts

  2. go to the “DefaultChatMessage” module script located here:
    image

  3. replace it’s code with this:
    Updated DefaultChatMessage.txt (5.7 KB)

finished product:

1 Like

@CharlieGordonnn tho it still has some issues like if you whisper players it doesn’t work, but maybe u can send it to the team that handles that as a suggestion how to fix the chat?? (pls credit)

1 Like

Hi @lliliililililillliii , thanks for the updates and putting together the fix, really appreciated! While I am working on other possible solutions to this, since the new chat has come out, we will have to put less time on maintaining legacy chat. However we will continue working on this issue brought by the RTL feature because it does break things if the new chat does not work for you. We are sorry for the inconvenience.

Throughout our brain storms on this issue we have several possible solutions -
One of my thoughts would be - to put the name tags on the right side for messages in right-to-left languges, also wondering your feedback on this idea.

Another workaround could be - to use RichText. What I did is

  1. In Chat > ClientChatModules > MessageCreatorModules > Util, add a new method
function methods:CreateLeadingSpaces(numNeededSpaces)
    return "<font transparency=\"1\">" .. string.rep(" ", numNeededSpaces).. "</font>"
end
  1. In the same script, find function methods:CreateBaseMessage(message, font, textSize, chatColor) and add BaseMessage.RichText = true before returning the BaseFrame and BaseMessage

  2. In the same script, find function methods:GetMessageHeight(BaseMessage, BaseFrame, xSize) and replace BaseMessage.Text with BaseMessage.ContentText since we made it RichText

  3. Search for string.rep(" ", numNeededSpaces) in Studio, and replace all that appeared in Chat (not CoreGui) with `util:CreateLeadingSpaces(numNeededSpaces)

Here I attached the whole module package:
TheChatModules.rbxm (121.2 KB)
And the screenshot I tried with this change
image

Please don’t hesitate to let me know if this works for you and any other questions! Thank you

2 Likes

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 :slight_smile:
2 Likes
  • Bug:
    image

Found the reason:

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
image
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…?

3 Likes

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.

5 Likes

Hi @lliliililililillliii , 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.

2 Likes

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

1 Like

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.

2 Likes

Hi @lolmansReturn , thanks for your feedback! We are also thinking of adding this right now.

2 Likes

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

2 Likes

Hi @Myoffice129 , I have internally forwarded your post to the related team and they will work on investigating the issue. Thanks for your patience!

3 Likes

use @Bug-Support

1 Like

Hi everybody, our phase 2 is announced just now, please check this article around new updates and please leave your feedback there!

3 Likes