Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mosk on Mon 11/12/2006 20:36:16

Title: Changing Language.. (SOLVED)
Post by: Mosk on Mon 11/12/2006 20:36:16
okay, this is what I want to know...
I created a game in spanish, and made the english translations, BUT I want to know if there's a code or something like that to solve my problem; for example, spanish is the game's default language, so all the game is in spanish. but if the player wants to play it in english, he'll get the dialogs and speech translations, but not the whole game. so here's what I want to know; how can I change for example, the sprites that appear in the intro room of the game (abrir-->restore as a sprite) when the player changes in the setup the language to english.
I don't know if I was clear enough; if nobody understand my issue, I'll try to explain it again in a better way. :)

here's a crappy draft I made to explain what I want to know :P

(http://www.fileden.com/files/2006/9/22/233807/ejemplo.PNG)
Title: Re: Changing Language..
Post by: Khris on Mon 11/12/2006 20:46:43
In the room's player enters screen (before fadein):

  if (Game.TranslationFilename=="english") {
    // change buttons/sprites here
  }


I'm not sure if this fully answers your question or if you need to know how to change the sprites, too?
Title: Re: Changing Language..
Post by: Mosk on Tue 12/12/2006 06:12:11
Quote from: KhrisMUC on Mon 11/12/2006 20:46:43
In the room's player enters screen (before fadein):

Ã,  if (Game.TranslationFilename=="english") {
Ã,  Ã,  // change buttons/sprites here
Ã,  }


Hey dude! thanks a lot! I'll do this, I think this is going to work! ;D

Quote
I'm not sure if this fully answers your question or if you need to know how to change the sprites, too?

I'm gonna post again if I still have some problems :P
Thank you very much!


Title: Re: Changing Language..
Post by: monkey0506 on Tue 12/12/2006 06:56:15
Just a thought but if you number all your graphics so that each language has an offset from the default, i.e.:


So that, for example, if your default sprite for a button is sprite 38, the English sprite would be sprite 39, French would be sprite 40, Italian sprite 41, and German sprite 42.

Then you could just set all your graphics to their default (Spanish) graphics, and depending on the translation being used offset the graphics by that much.

Might help to simplify some things. :)
Title: Re: Changing Language..
Post by: SilverWizard_OTF on Fri 15/12/2006 09:09:29
Keep in mind that you can also create an "english" background. So, if player selects spanish, then in the other room (before fade in) you can have the script commands:
  if(player_option==0) {
    SetBackground(1);
  else
    SetBackground(2);
    }

(I am not sure it is SetAckground, check it in AGS' help).

Or you can have different objects (some with english words and some with spanish, but if player selects e.g. spanish, then the english one will be turned off --- object
Title: Re: Changing Language.. (SOLVED)
Post by: Mosk on Sat 16/12/2006 22:46:09
Hey thanks a lot mates!  :)
I'll have in mind all your suggestions!
so, let's start working ;)