"Translator:Translate is not enabled yet."

I am trying to figure out how to translate my game to russian for the russian players.
I found an instance called Translator Which basically should allow you to get entries from a localizationtable and then apply them. However whenever I try to use it by doing

local translat = game.LocalizationService.MainGame:GetTranslator("ru-ru") translat:Translate(workspace.CoretempLobby.SurfaceGui.Frame.TextLabel,"Core Temperature")

It errors “Translator:Translate is not enabled yet.” What does this mean?

This isn’t enabled yet, I had the same issue:

also what is that variable naming reinhard, i’m disappointed

1 Like

It was just for a quick test to see what exactly the function did, dont judge me :frowning:

I feel bad for the kid that translated stuff to russian for me, he did all that for nothing now

1 Like

I believe the :Translate method will be used to automatically translate strings, similar to how Google Translate works.

If you already have a pre-written localization table, you should be able to use :FormatByKey instead. This article might be helpful as well.

Example code:

local translator = game.LocalizationService.MainGame:GetTranslator("ru-ru")

workspace.CoretempLobby.SurfaceGui.Frame.TextLabel.Text = translator:FormatByKey("CoreTemp")

(Disclaimer: Never actually used LocalizationService, so not entirely sure how it works)

1 Like

No, :Translate will actually be a shortcut for the auto-translation that Roblox does when a localizationtable is present. It won’t do automatic translation. It’s just a way to get from Source → translated text in your localizationtable, also when that Source includes patterns. This isn’t possible right now because we only have FormatByKey which goes from Key → translated text (not Source → translated text, and can’t take text that has patterns applied to it, such as mapping “1 apple” to “{1:int} apple”).

2 Likes