Update LocalizationService to use the longest-matched source string for translation

As a Roblox developer, it is currently extremely difficult to attain 100% translation coverage when you have several strings that use a similar source format. Especially if you have dynamically placed strings that don’t contain exact “Context” information.

Let’s say I’m trying to translate the string “Reach 1000 Money”, with these 2 source-strings available in my Localization Table: (Each without Context)

  • Reach {1}
  • Reach {1} Money

For this string, the current localization system will often (Or always) pick the first option here, rather than the longer 2nd option which is a better fit for this string.

This can cause huge amounts of untranslated text. Especially if you have a lot of text following the initial “Reach” word from this example. When I have the context-less string “Reach {1}” in my table, every sentence in the game that starts with “Reach” will only have the very first word translated, unless they have Context information themselves.

This is a massive pain-point to fix manually as I would have to start using Translator:FormatByKey to prevent this from happening. To the point where it’s not worth the time.

If roblox is able to address this issue, it would improve the experience for all my non-english players, thanks to better translation coverage.

4 Likes