Smart way to dynamically translate a scen? (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios



Message


ClaudeJ -> Smart way to dynamically translate a scen? (6/17/2017 1:29:01 AM)

Hello community,

I thought about translating some scenarios to provide some confort to English impaired players that may lay around. However, I would like to figure out a(n easy) way to have maintain such scenarios while they are updated for whatever reason, ie. by avoiding to create a standalone scenario.

So, would anybody have a bright idea on how to achieve that? Eg. code a Special Action that would display the translated text instead of the original English one.

Thanks for your inputs.




Dan109 -> RE: Smart way to dynamically translate a scen? (6/17/2017 3:48:56 AM)

Good topic,

I would have an event launch as soon as the scenario starts which determines the desired language assistance. I'd use either use SpecialMessage and then InputBox SE functions to display options and ask for the language, or perhaps even SE_MsgBox and ask if Spanish (in Spanish) is preferred, button options are yes/no/cancel. Yes ends the dialogue choosing Spanish, cancel will default it to English, no will call another SE_MsgBox with the next language, etc. None of this is perfectly elegant, as we don't have a function which can display text AND ask for an answer to the question in that text. Store the language assistance selected in a KeyValue, so it's perm and will be saved.

Existing events will need to then be modified. If they are visible events, the name of the event is usually important to understand and has meaning, so a LUA script inserted to print the translated name of the event to the log, which should also appear on the bottom left message log. It would be a series of nested if/then/else statements based on the value of the KeyValue representing the language selected. As many events do not have LUA code in their action, I would put the LUA code for this in the event conditional, i.e. "If not English then...". I actually have never used a LUA script in an event cause conditional, we obviously want the event to proceed for ALL languages - maybe LUA event conditionals need to be a function, returning true or false. If so, the function can always return true, but while in the function, print additional info based on the language assistance KeyValue. An example would be you might want language assistance during a score event, or whatever.

Further, all LUA event actions would need to be inspected to see if they use Special Message or MsgBox, and have language specific versions be used, rather than the ones printed in default English.

Hope that helps, its not terribly easy, but nor is it difficult to do. This is the most complete method of language assistance I can dream up with available tools.

Dan




Dan109 -> RE: Smart way to dynamically translate a scen? (6/17/2017 4:53:11 AM)

Oh, btw, I forgot to address your q about special actions. Yes, to give "on demand" ability to display translated scenario description and side briefing, use special action for each and use the language assist KeyVar to call SE_SpecialMessage with the appropriate language.




Gunner98 -> RE: Smart way to dynamically translate a scen? (6/17/2017 10:13:27 AM)

This is an interesting conundrum.

I take your points in the other thread for a start - use simpler English - not my strong suit for certain.

A most of us will have to rely on Google Translate for this process, a work around for players is to have that open, and cut and paste the messages into it.

A good practice for players, of whatever language ability, is to cut and paste the messages into some form of text document anyway - keeps a record handy.

I've used tis to read AARs in French, Spanish and Greek - Google doesn't do Greek well I can tell you, but it's passable for French & Spanish, probably German. Not sure at all about Asian languages though.

B




ClaudeJ -> RE: Smart way to dynamically translate a scen? (6/17/2017 3:08:05 PM)

Thank you both for your advice, I'll try to cast some Lua magic and I'll think about an attached/linked localization.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.564453