RobloxLocaleId does not change when user's language is 'unsupported'

Recently I have been trying to debug why my images would not translate into other people’s languages. I am using a custom system that uses RobloxLocaleId to lookup the correct image IDs to use for a player.

However, I was today made aware that this system doesn’t work for unsupported languages - that using RobloxLocaleId doesn’t work properly and so for unsupported languages, there is no one single way to accurately identify the players locale.
This is the output I obtained from a Dutch user with their language set to Nederlands on the site:

RobloxLocaleId: en-us
SystemLocaleId: nl-nl
Translator.LocaleId: nl-nl

This player then changed their language to English and got the following:

RobloxLocaleId: en-us
SystemLocaleId: nl-nl
Translator.LocaleId: nl-nl

Yep… thats exactly the same, even though the language on the website was changed and they could see the correct Cloud Table (AutoLocalize) translations. Note that here, Translator.LocaleId is returning the wrong value even though nl-nl is this users location. Their language is not set to this locale at all!

Essentially there is no way that my game can determine what language a player has set on the website. This means that image translations will always localise to English for unsupported languages, i.e languages that show this when you switch:
image

I manually changed my website language to Spanish, a supported language, and behold…

RobloxLocaleId: es-es
SystemLocaleId: en-gb
Translator.LocaleId: es-es

It works!

However, what makes this very frustrating is that RobloxLocaleId is changed when you use the Studio emulator to change your Locale, meaning that for months I have believed my manual translationshave been displaying perfectly, when in fact they haven’t.
image

I am unsure what the underlying problem here really is - whether the Studio emulator’s behaviour is wrong, or whether RobloxLocaleId in game is wrong. One thing is for sure though - the behaviour of RobloxLocaleId is inconsistent at best, broken at worst.

8 Likes

This looks like a feature request and not a bug report, i.e. Roblox should forward the value of the site setting without defaulting to English if the main website’s localization does not support that language yet.

1 Like

The web-based localization tables (Cloud tables), the games page and product localization pages, and the ‘Player Emulator’ in Studio all use the full extended range of RobloxLocaleId languages that the player is able to set on the website. Additionally, developers participating in Localization-related developer programs have been told to stop using SystemLocaleId since all the unsupported languages have been added to the list for RobloxLocaleId.

RobloxLocaleId not reporting back the correct value that the player has set for usage in games, despite correctly working with all the web-based tools, definitely seems to be a bug as it is not how this has been communicated to developers and is inconsistent.

The info message “While some games may use the selected language…” confirms that unsupported languages are supposed to be reported to developers of games, which it is currently not the case.

7 Likes

Just ran into this issue when trying to work on some Indonesian translations. I personally see this as a bug since all the translations created in the translator portal work fine for Indonesian. However, anything that requires me to use FormatByKey won’t work because I can’t get the correct translator through the player’s RobloxLocaleId.

As of right now, instead of using RobloxLocaleId, I’m using:

LocalizationService:GetTranslatorForPlayer(player).LocaleId

It’d be really nice if this was fixed.

1 Like

Bump !
This bug has been around since a while, and it would be nice if it was working correctly.
My use-case is that I use the RobloxLocaleId to call the badges api with the Accept-Language header, so that I can display the badges names and descriptions translated in-game. I haven’t found any other convenient method to achieve this.

Hi, thanks for reaching out!

RobloxLocaleId is the locale used for localization of internal features (e.g. core UI). It may be English when the language is not yet supported internally.

To get the user’s locale, you can either use the LocaleId property on the translator returned from GetTranslatorForPlayerAsync or you can access the Player.LocaleId field directly (right now this field is marked as hidden but we will put up a change soon to unhide it.)

Note that the value of the player’s locale can change. If you localize via AutoLocalize then this change will be handled automatically, but if you are localizing via scripting make sure you account for any changes (see the “Reacting to Users Switching Languages” section here: Localizing with Scripting | Documentation - Roblox Creator Hub for more details).


Just ran into this issue when trying to work on some Indonesian translations. I personally see this as a bug since all the translations created in the translator portal work fine for Indonesian. However, anything that requires me to use FormatByKey won’t work because I can’t get the correct translator through the player’s RobloxLocaleId.

I’d recommend you use the GetTranslatorForPlayerAsync function for this. You should be able to use FormatByKey on the returned Translator .


This bug has been around since a while, and it would be nice if it was working correctly.
My use-case is that I use the RobloxLocaleId to call the badges api with the Accept-Language header, so that I can display the badges names and descriptions translated in-game. I haven’t found any other convenient method to achieve this.

You can actually translate badges via the translator portal the same way you translate in-game content :slight_smile: The docs describing this are here: Translating Experience Page Content | Documentation - Roblox Creator Hub

1 Like