Author Topic: Multi-language support  (Read 6270 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Multi-language support
« on: May 02, 2011, 08:23:51 PM »
Based on Robin's suggestion, I'm starting this thread (seen here http://sciprogramming.com/community/index.php/topic,328.msg2424.html#msg2424)

I'm interested in creating a multi-lingual game myself (specifically English & French).  I figured that using multiple sets of text resources made the most sense & then creating a menu option or some other dialog that prompts the user as to which language they would like. 

Is there a 'standard' way of implementing multiple languages within the same game?  Has anyone done this with the template game?


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: Multi-language support
« Reply #1 on: May 02, 2011, 10:12:18 PM »
I tend to doubt that the template game recognizes the language switch. Currently, I am waiting for dialog translations  for my GK2 installers. When released there will be the main GK2 installer that will install the entire 6 CD game to the hard drive. There is a fan made English subtitle patch and a new fan made Spanish patch that can be installed into the hard drive installation. I also have a wizard that will convert the installed folder into a package ready to be burned to a DVD. The DVD will be complete with new installer and Autorun. The game can be installed from the DVD with a minimal install, which requires the DVD to play, but no disc swapping. It can also be installed completely to the hard drive for disc free play.  The part that you will be the most interested in is that the subtitle patches can be can be installed from the same DVD. The subtitles can be selected from my config tool to turn off the subtitles or select between the English or Spanish subtitles.

The way that I manage this is that I keep the two subtitle patches in separate folders from the regular patches. The config tool is a variation of my config tool that I include with all of the SHP installers. I have added a subtitle selection to it. The tool writes a dosbox.conf based on the user's choices. When a change is made to the subtitles it changes the autoexec line in the conf to use a different RESOURCE.CFG. two differences between each of the config files is the value of the language switch and the first folder listed in the patch paths. The first one listed is the one that the game will use first. Each of the three RESOURCE.CFG files is in a different folder. The game will write its save games in the same folder as the RESOURCE.CFG, which keeps them separate. This is desirable as they are not compatible with the other subtitle choices.

The optional language files are just patch files translated using Enrico Rolfi's TraduSCI tool. This is the tool that Rolfi created to translate the game into Italian. I believe that the original Spanish subtitle patch was made from the official Portuguese language release of GK2. Don't ask me why Sierra released a Portuguese version and not Spanish. This was made by a Spanish user, "Kelme" in 2003. An SHP user, Laffer, using the Kelme patch as template and TraduSCI added English subtitles. This is why both use language=351, even though English is language=1. Another SHP member has been working to improve the Spanish subtitles by also translating the in-game graphics.

To do it with a new game you could have two sets of text/vocab resources and drop the second language specific files in another folder and direct the game to it with the patch path statement in the RESOURCE.CFG. Question is whether the template game recognizes this statement. You would also need to translate the SIERRA.ERR file. Since the template game may not recognize the language switch you might have to hack in the translation to the UI. I would guess that the menubar is in the main exe. Perhaps you could translate it with a HEX editor. In any case, it would be an interesting project.
KQII Remake Pic

Offline Cloudee1

Re: Multi-language support
« Reply #2 on: May 02, 2011, 11:25:01 PM »
I haven't done it, but makes sense. I would even go as far as adding an offset variable. say texts 0 through 99 in english, 100 through 199 hungarian, etc. build in the language selection, maybe even in the menu. and then just get creative with your print statements... Print((+ 4 languageOffset) 3)... I haven't tried math in a print statement but I'll bet that would work.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: Multi-language support
« Reply #3 on: May 03, 2011, 08:16:53 AM »
At least with SCI, it seems to me that as long as text resources were used exclusively, you should also be able to drop the resources into the main folder and it would use those resources first, before using the ones packed into the .00x files.

This also reminds me of the work that I did earlier with extraction & translation of text resources from a .00x file - for grammar & spelling.  Just need a translation option.  I briefly looked at the TraduSCI tool - looks like it does pretty much the same type of stuff I was working on (export/translate/import).  Probably no need for another tool in this arena, unless the quality of the translations could be improved.

Collector, I hadn't considered 'non-game specific' messages needing translation as well.   I do however think the menu bar is available to us within one of the scripts as I recall - I'll look into that.

Yeah Cloudee, I had the same thought regarding a simple offset - that would make it really easy.  The math within Print() works just fine.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: Multi-language support
« Reply #4 on: May 03, 2011, 01:24:44 PM »
Interpreter error messages should be in the SIERRA.ERR or INTERP.ERR file. TraduSCI might be able to translate this, if not perhaps hex editing. Don't forget graphics. GUI items, images of signs, objects or various things you might have in the backgrounds.

Edit: I just opened the INTERP.ERR of Freddy Pharkas. It looks like it can be edited with a simple text editor.
« Last Edit: May 03, 2011, 01:28:30 PM by Collector »
KQII Remake Pic

Offline gumby

Re: Multi-language support
« Reply #5 on: May 03, 2011, 09:42:27 PM »
Menubar.sc is one of the scripts in the template game, but it does not leverage text resources.  That could easily be rectified.

Our games do not appear to have any .ERR files.  Perhaps the error messages are embedded?
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: Multi-language support
« Reply #6 on: May 03, 2011, 10:42:35 PM »
Just checked LSL3, which I remember Brian using when he was creating the template game. It lacks the .ERR file. Looking through my games it looks like the error messages were moved off of the interpreter at some point after the first SCI1 games. Perhaps this was done to make translations easier. No need to rewrite/recompile the interpreter for just a translation. Might be interesting to know when the language switch was added in comparison. The two would make multi language releases easier, as oppose to separate releases fro each language. This would be especially an important consideration for Europe.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.042 seconds with 22 queries.