TextService:FilterAndTranslateStringAsync() returns a TextFilterTranslatedResult that always returns nil when trying to get text string for

Problem

With the recent announcement of in-experience chat language translation, I have been attempting to add this feature to my custom in-experience chat. However, when I call TextService:FilterAndTranslateStringAsync() and get a TextFilterTranslatedResult object, then call TextFilterTranslatedResult:GetTranslationForLocale() to get a TextFilterResult object, it always returns nil. I have tried many ways to get this to work but it refuses to.

Additionally, there is no documentation on this, except for what the method’s parameters are and what it returns. However, it is being used in the legacy LUA chat system. I had to figure out how to use this without the benefit of the documentation by looking at how it was used in the old LUA chat. I did notice that there are checks to see if it returns nil in the old chat, which makes me think that it may return nil if there is nothing to do. It’s entirely possible that I am not using it correctly. In fact, it’s entirely possible that Roblox is using a different API all together that hasn’t been published yet.

Additional Information

Parameter Value
Problem Area Engine
Problem Component API: TextService
First Noticed 17 Feb 2024
Impact Minor
Annoyance Level Moderate

There is a live game demonstration for this as well: Bug Demonstrations

Expectations

What I expect to happen is that I get a FilterResultObject when calling TextFilterTranslatedResult:GetTranslationForLocale() instead of nil.

Visuals

From game.Chat.ChatServiceRunner.ChatService

From game.Chat.ChatServiceRunner.ChatChannel

Reproduction

To reproduce the issue, follow the steps below.

  1. Open the reproduction file provided below in Studio.
  2. Play.
  3. Type something in the text box (top frame)
  4. Observe the results in the text label (bottom frame) and in the output window.

Files

Engine - Chat Text Translation.rbxl (63.4 KB)

Hey @Maelstorm_1973 - thanks for your report! The chat translation feature is only available in TextChatService. The method that you mentioned in your post is deprecated and will not be supported; we are working to update our documentation to reflect this. We apologize for the confusion.

@hydr0h0mie Are there any plans to make the API for the translation feature available to developers that use a custom chat system like myself? If so, about when is that expected? What does the roadmap for this look like?