GetTranslatorForLocaleAsync is unrealible and doesn't work in studio

I’m trying to translate an English text to French using a test profile with fr-ma locale, however no text is being translated, I double checked my locale and it returned fr (french) yet the text still stays in english.
image
Chasse is Bat in french, but its description remains in english, same goes for built-in tooltips. (Which is incorrect since Bat literally translates to Batte in french.)

_G._Traduire(_message.TextLabel, Message)
local Localization = game:GetService("LocalizationService")

_G._Traduire = function(_textLabel:TextLabel, _text: string)
	local function _trouverLocale()
		return Localization.RobloxLocaleId:split("-")[1]
	end
	local _sucess,_translator = pcall(Localization.GetTranslatorForLocaleAsync, Localization,  _trouverLocale())
	if _sucess and _translator then
		--print(_translator:Translate(_textLabel, _text))
		_textLabel.Text = _translator:Translate(_textLabel, _text)
	else
		_textLabel.Text = _text
		warn("Erreur de traduire!", _translator)
	end
end

image

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue and will start investigating, we will update you when we have further information.

Thanks for flagging!

2 Likes

Any updates on this? Because I’ve recently noticed that some of the text that wasn’t translated properly has now been translated.

Hi there, the source string should be added to your cloud localization table before translations appear. The text scraper sometimes takes a while (up to a couple of days) to ingest the strings into your cloud localization table, which could explain why the translations weren’t immediately available.

I hope this clarifies your question!

1 Like

That should be at least clarified in the docs, I thought it would work like a machine translator where the translated text would be output instantly.

Thanks for the feedback. We’ll update our docs to make that point clearer.

1 Like