I want to support multiple languages NPC dialogues in my multiplayer game. So for example, if a player selects the English language he should see NPC dialogs in English and if he selects Korean he should see them in Korean.
My dialogs are written in the groovy script and being handled at the server-side. And I will keep dialogue translations in JSON files.
Should I return a translated dialog page to the players directly from the server-side or I should just return a dialogue page id and do the translation at the client-side? for the later, I need to keep a copy of my dialogues JSON translations at the client.
Sometimes I would also need to format the text before displaying it. For example, an NPC dialogue text might look like
Hi <playerName> !
playerName should be replaced by an actual name.
I am not sure if I should do all this stuff at the server-side or at the client-side.
I am interested to know your opinion