You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I’m currently creating a game that allows NPC’s to chat a coffee order to the player. All the strings for the drink orders are in the game’s localization table but do not auto translate like the other aspects of the game. -
What is the issue? Include screenshots / videos if possible!
I am trying to access the localization table to make the NPC chat the translated string for the current locale of the player. I’ve tried using most of the sample codes from the developer docs but can’t seem to get it right. I am trying to get the LocaleID of the player (server-sided preferable, it’s a single player game,) then grab the translation from the locale table for that ID. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried to use the documentation for Locale but it’s been very hard to understand which functions do what. I specifically tried to get the translator for the player and use a pcall to translate it from the table with no success.
Is anybody able to point me in the right direction or to a page from the documentation that might fit this situation? I am a complete novice when it comes to localization on ROBLOX other than setting up the auto-translation so any help or guidance would be appreciated.