I’m trying to edit a string that gets changed during live run time, however it is not working despite my locale being fr (French)
The top text does get translate but the one with numbers does not, why?
_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
Bump, still need with this. Texts don’t even get translated when they changed.


Despite my locale being French.
_G._Traduire = function(_textLabel:TextLabel, _text: string)
local function _trouverLocale()
return Player:GetAttribute("_locale")
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
print("Locale de ", Player.Name, "est", Localization.RobloxLocaleId:split("-")[1])
Player:SetAttribute("_locale", Localization.RobloxLocaleId:split("-")[1])
Localization:GetPropertyChangedSignal("RobloxLocaleId"):Connect(function()
Player:SetAttribute("_locale", Localization.RobloxLocaleId:split("-")[1])
end)

I don’t even know if this is an issue on my end or roblox’s.