Convert string to specific language (e.g. Spanish)?

Is there a way I can use LocalizationService to translate a string to a specific language, like Spanish? I found this but it’s not what I want (I think?): LocalizationService | Documentation - Roblox Creator Hub

I don’t care what language the player speaks. No matter what, I want this string to be translated to Spanish. Do I need to use Google Translate instead? Is this even possible?

(In that order of traversal)

2 Likes

Thanks. I’m not sure if I want to set all that up just to translate one string. Is there a way I can do this with Google Translate and HTTP Service?

What’s your use case? I highly recommend using a LocalizationTable for strings that you put into the game yourself.

If this is user-inputted text, then yes you’d have to go by Google Translate, but don’t expect the results to be good. Google Translate likes to mangle grammar for anything that doesn’t have a trivial sentence structure and it won’t be a good experience for your Spanish users.

2 Likes

I want to make a plugin to translate strings for my personal use. I just wanted a lot of control over what I’m translating; maybe I can get that with LocalizationService?

With LocalizationService, don’t I have to manually put in the translations? If so, it would be similar to what I have in mind, I just wanted to automatically get a rough translation first.

LocalizationService is like a database for strings that also automatically translates any text elements in your game that are present in the LocalizationTable. You can use the AutoLocalize property on UI to have it automatically look for applicable translations, or you can lookup translations yourself, and it has special rules so you can have things like “{1} has killed {2}” and that will translate a TextLabel that has “Alice has killed Bob” correctly.

It doesn’t actually do any translation. It’s just a repository used for managing sources and translations.

I would recommend going for an actual translator if you are using these strings in a game, but in the mean-time I suppose a translation API like Google Translate or similar does the trick for a plugin.

2 Likes

Thank you so much for clearing that up for me! I think I understand it a lot better now (I’ve never bothered to localize anything before…)

I think I’ll just use LocalizationService and manually do the translating stuff. I appreciate it. :slight_smile:

2 Likes