I am trying to set up a translation system, and I’ve got the majority of it working, however I am struggling with a problem that involves going from Spanish to English. Specifically, the translator is not translating from Spanish to English. I am attempting to compare the name of a tool with the English name of it so that I don’t have to check it against all languages, however it is not working.
Below is English to Spanish, which works fine.
Now I would expect the following Spanish to English to work and print out “First-Class”, however it does not, and instead returns Primera-Clase back.
Translator script:
local tSucc,translator = pcall(game.LocalizationService.GetTranslatorForLocaleAsync,game.LocalizationService,"en")
-- Checks if a string is equal to the english representation
-- This function currently always returns false because translation is only going one way
module.LocaleCompare = function(str,eng)
return eng == translator:Translate(game,str)
end
I’m using the online portal’s simple translate features (no keys or contexts), and the source language is set to English. I do not have an English language set in configure localization (due to it being the source language it does not allow me).