Here’s a question that I’m having trouble finding the answer too, probably because I don’t have the right terminology.
I’m currently converting ’s language engine to use the Chrome messages.json style of language files:
We’re doing this so we can use to let our users and anyone else contribute translations without having to deal with our somewhat-obscure Lua-based translation file format, not to mention not needing to learn Git.
So the last bit I need to figure is how to (or if I should) replace our mission string system, which we call “flavours”. The idea is pretty straightforward. We have NPCs that hand out missions. When asked, they give more information. Then they’ll have a response for mission success and failure too.
So we group all these bits of dialogue together, and that’s a flavour. A language file can provide as many of these as it wants, and the mission module will choose one. The actual text isn’t important, they all work the same, but it gives a little bit of variety. What is important is that the messages within the group are consistent with each other (the guy who uses rhyming slang shouldn’t suddenly start saying the lines meant for the emotionless robot), and also that they make sense to the reader, based on the conventions of the language and the appropriate cultural context.
That’s more than a simple key-value string table can provide.
Of course we could provide a secondary set of tables to collect strings together, and we might have to do something there, but it adds extra logic that translators have to be aware of. For example, if there’s
QUESTION_3 etc with corresponding
ANSWER_3 then all those strings have to be translated, and there’s no scope for more or less to be done. Doing more can’t readily be accomadated because none of the other translations will have them. Doing less will mean we fall back to English for the missing ones, which is very jarring.
The few places that talk about dynamic dialogue in anything more than a high-level abstract way seem to assume either a big team of translators that can provide enough consistency and variety to make this work well, or ignore translation entirely by doing things like constructing sentences from fragments. Neither of those are really viable for an open-source game project.
Please point me to the answer. Thanks you :)
The Pioneer translation project on Transifex