Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Smart way to dynamically translate a scen?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Smart way to dynamically translate a scen? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Smart way to dynamically translate a scen? - 6/17/2017 1:29:01 AM   
ClaudeJ


Posts: 1213
Joined: 3/8/2006
From: Belgique
Status: offline
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.
Post #: 1
RE: Smart way to dynamically translate a scen? - 6/17/2017 3:48:56 AM   
Dan109

 

Posts: 175
Joined: 4/27/2017
Status: offline
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

< Message edited by Dan109 -- 6/17/2017 3:51:45 AM >

(in reply to ClaudeJ)
Post #: 2
RE: Smart way to dynamically translate a scen? - 6/17/2017 4:53:11 AM   
Dan109

 

Posts: 175
Joined: 4/27/2017
Status: offline
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.

(in reply to Dan109)
Post #: 3
RE: Smart way to dynamically translate a scen? - 6/17/2017 10:13:27 AM   
Gunner98

 

Posts: 5508
Joined: 4/29/2005
From: The Great White North!
Status: offline
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

(in reply to Dan109)
Post #: 4
RE: Smart way to dynamically translate a scen? - 6/17/2017 3:08:05 PM   
ClaudeJ


Posts: 1213
Joined: 3/8/2006
From: Belgique
Status: offline
Thank you both for your advice, I'll try to cast some Lua magic and I'll think about an attached/linked localization.

(in reply to Gunner98)
Post #: 5
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Smart way to dynamically translate a scen? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.422