Does LocalizationService:Translate work both ways?

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).

Translate does not work both ways. It tries to find the text in the game’s source language. You’ll need some fancy setup with keys for this to work iirc.

Why do you need to translate Spanish to English (when English is the source language)

The name of the tool is changed so that the translated title is shown to the player.

Have you considered using something like an instance value to tag the tool’s original name/slug?

I’ve been trying to avoid using value objects and waiting for the new attribute functions, but I can try that.

value objects don’t really cause any issues, they’re just best to avoid unless absolutely necessary.

you can clean up your code to use attirbutes when they release.