Hello! Thank you for taking your time to read my post.
What I’m trying to accomplish is manual localization. I was wondering can you retrieve the translations from a Localization Table or would I need to go about it differently?
For using :GetTranslator() I did this, it isn’t working because the Context is a string value and needs to be an Instance.
local Translator = game:GetService("LocalizationService").GeneratedLocalizationTable:GetTranslator("es-es")
for i,v in pairs(game:GetService("LocalizationService").GeneratedLocalizationTable:GetEntries()) do
Translator:Translate(v["Context"], v["Source"])
end
What you would do is loop over TextLabels, TextButtons, etc and then feed that object as the Context, not the stringified version of the context that is present in the localization table. You’d put the result of the :Translate call in the Text field of those objects.
Correct but even so your code would not be doing anything to begin with. You don’t do anything with the return value of Translate, all you are doing is looping over your localization table.