Switch translation

Started by Le Woltaire, Thu 12/06/2008 22:10:50

Previous topic - Next topic

Le Woltaire

Is it possible to change the translation with a GUI in the game?

Example: You have a button and switch to the English translation from the German translation when you click on it.



Khris


Le Woltaire

Phew...how boring...

I think it would be useful.
Many people don't recognize that there is an additional translation in their own language
especially if it's the first time that they get confronted with an AGS game...
Including it into a GUI would be great...

Isn't it possible to script a command that accesses the acsetup.cfg file and resets the translation?

Something like: SetTranslation("German");




Khris

#3
You can code a custom Launcher that'll rewrite acsetup.cfg.

Having said that, people who don't care to read a game's publishing notes and/or the readme, do they deserve special treatment...?

Le Woltaire

Yeah...I know...
In most cases people don't bother with the manuals...

Besides, it could be part of a gaming concept.
We already had games that used multiple languages during the game like Soviet Underzögerdings.

In my case the possibility to switch between languages would fit very good with the whole concept of the game...



JpSoft

You can also add a "Change language GUI" where you could explain to the player what he must do if he want change the language, and optionally, the translations available.  :)

Of course, create your own launcher is a better solution, but it requires some knoweledge about it.

Jp

Khris

It MIGHT be possible to change acsetup.cfg from withing the game, then use RunAGSGame to restart the game itself...

And of course there's the possibility to use a custom translation system; switching languages in-game won't be a problem then.

Le Woltaire

Quote from: KhrisMUC on Fri 13/06/2008 06:39:24
It MIGHT be possible to change acsetup.cfg from withing the game, then use RunAGSGame to restart the game itself...

That would be absolutely enough...
All I need is a way to access the acsetup.cfg from within the game...
Rewrite it with all existing settings and rerun the game...

I made a test with this script:
Code: ags

function Engl_OnClick(GUIControl *control, MouseButton button)
{
File *output = File.Open("acsetup.cfg", eFileWrite);
if (output == null)
  Display("Error opening file.");
else {
  output.WriteString("[misc]");
  output.WriteString("gamecolordepth=32");
  output.WriteString("defaultres=4");
  output.WriteString("screenres=1");
  output.WriteString("defaultgfxdriver=DX5");
  output.WriteString("gfxdriver=DX5");
  output.WriteString("cachemax=102400");
  output.WriteString("windowed=0");
  output.WriteString("refresh=0");
  output.WriteString("gfxfilter=None");
  
  output.WriteString("[sound]");
  output.WriteString("digiid=-1");  
  output.WriteString("midiid=-1");
  output.WriteString("digiindx=0");
  output.WriteString("midiindx=0");
  output.WriteString("digiwinindx=0");
  output.WriteString("digiwin=1096302880");
  output.WriteString("midiwinindx=0");
  output.WriteString("midiwin=-1");
  
  output.WriteString("[language]");
  output.WriteString("translation=English");
 
  output.Close();
  RunAGSGame("A Second Face.exe",0, 0);}


It seems to work at the first moment,
but then I recognize that the acsetup.cfg messes up.
All strings are in one line.
And I get those funny rectangles between them...



Khris


Le Woltaire

Ok It works now, but AGS doesn't seem to rerun the config settings when running another game...

I still get it in German after clicking the button...
When I exit and restart the game it runs in English...




Joseph DiPerla

It might store the settings in a buffer once the game is loaded. Therefore, changing the config file wont do anything. RunAGS seems to be using the same settings in the buffer.

Have you tried using the SetRestartPoint script function and then RestartGame to restart the game to see if that changes anything?
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

GarageGothic

Yeah, AGS doesn't re-initialize the settings when you use RunAGSGame. That also killed my ambition of being able to change resolution and toggle windowed mode from in-game. Seeing as RestartGame in effect just restores savegame file 999 it shouldn't make any difference.

Joseph DiPerla

Just tried my idea. No Deal. It edits the file fine and it restarts, but nothing. Still in English.

Sorry.
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Pumaman

It would be possible to add some sort of ChangeTranslation script command, if people would find it useful?

GarageGothic

I think it's a good idea. Perhaps an overhaul of the translation code could be part of the next AGS version, along with the scheduled reworking of the dialog system? I remember there were requests for separate speech files such as german.vox, french.vox and so on.

Also, I recall reading in an old thread that:

Quoteif a translation is in use the speech won't play

Is this still true? I didn't see it mentioned in the changelist, so I assume so. If so, that's quite a pity. I'm sure a lot of non-english speakers would enjoy, and could even learn from, playing a game with English audio and localized subtitles.

(Perhaps lipsync for LucasArts style speech could be implemented in the process? *hint hint*)

Le Woltaire

#15
Actually when I developed Earl Bobby I used translation files for the voice actings.
So the voices can play in a translation.
Blashyrkh scripted some Perl scripts that make the dubbing of translation files easier.
You can find them somewhere on my homepage...

But my main argumentation for a Change Translation command is:

It makes clearly comprehensible that the game can be played in another language.
For example by having some little flags on the first screen site (like on Homepages...)
If people don't understand English, they won't get how the setup.exe works.
That's one of the reasons why we make a translation...



Pumaman

Yeah, I can see that it would be good to be able to have a GUI when the game first starts up that asks the player what language they want, and there's no technical reason why this couldn't be added. I'll look into it for 3.0.3.

SMF spam blocked by CleanTalk