Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Vincent on Mon 31/03/2014 22:50:13

Title: Translating
Post by: Vincent on Mon 31/03/2014 22:50:13
Good Evening To All AGSer,

I Have Another Umpteenth Question For You...
For Me It Is The First Time I'd Love To Do A Translation In AGS.

How Can I Implement A Translation ?!
Could Someone Suggest Me How To Do That ?
Or, Could Someone Give Me A Practical Example ?!

Thanks In Advance Guys, :)
Ciao Khris
Title: Re: Translating
Post by: selmiak on Mon 31/03/2014 23:28:48
Do you want to translate your own game or someone elses game? If you want to translate your own game it's all in the manual, you generate a translation file, translate it line after line and then compile the game and AGS creates a translation file you can select via the winsetup. If you want to translate an already existing game your best strategy is to contact the author of the game and if the author likes the game in question translated you will probably receive this file you translate line after line and there you go.
Title: Re: Translating
Post by: Vincent on Mon 31/03/2014 23:48:22
Thanks selmiak for answering.
I would like to translate one of the game that I did before.
I think I understand.
What do you mean exactly with generate a translation file ?



Title: Re: Translating
Post by: selmiak on Tue 01/04/2014 03:57:17
at the bottom of the project tree rightclick on translations and give the new language a name that the native speakers will also understand and after some more confirmations AGS creates the new file that wants to be translated in the game files directory with the name you gave it.
Title: Re: Translating
Post by: Vincent on Wed 02/04/2014 21:21:12
Okay I see
After generate the translation file,
it can be chosen within the game or it can be selected only via winsetup ?
Title: Re: Translating
Post by: Crimson Wizard on Wed 02/04/2014 21:32:44
How to change translation in game: look for "Game.ChangeTranslation" and "Game.IsTranslationAvailable" in the manual.
Title: Re: Translating
Post by: Vincent on Wed 02/04/2014 23:49:09
Thanks Crimson Wizard for answering.
In this game i should do a translation only for one language, Italian.
So the new line should be written earlier than the original ?

Code (ags) Select

//Example
InventoryItem *item = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
if (mouse.Mode == eModeUseinv)
{
    if (item.IsInteractionAvailable(eModeUseinv))
    {
      item.RunInteraction(eModeUseinv);
    }
    else
    {
      player.ActiveInventory = null;
      player.Think("(They Won't Work Together)");
    }
}
Title: Re: Translating
Post by: Ghost on Thu 03/04/2014 00:53:43
Quote from: VinVin on Wed 02/04/2014 23:49:09
So the new line should be written earlier than the original ?

I think you misunderstood the concept of a translation file; you don't need to provide translations within the game's script ;)

Create a translation file, as selmiak explained.
Now open that file with a plain text editor (I recommend NotePad++).
You will find all your original game's text in there, with empy lines in between.
To make a translation, just write the translated text into the empty line UNDER the original line.
Then rename the trs file into Italian.trs.
Import it into AGS.
NOW you have a working translation.
Title: Re: Translating
Post by: Vincent on Sun 06/04/2014 01:16:26
oh, I was understanding very wrong.
I am sorry, i need to try this for more.

Thanks Ghost For Answering.
Title: Re: Translating
Post by: SpeechCenter on Sun 06/04/2014 23:15:48
For external editing see if this tool helps http://www.adventuregamestudio.co.uk/forums/index.php?topic=46417.0
The Speech Center plugin also has translation editing, amongst other things http://www.adventuregamestudio.co.uk/forums/index.php?topic=45622.0
Title: Re: Translating
Post by: Vincent on Wed 09/04/2014 21:46:17
Thanks SpeechCenter For Showing.
I'll Watch Them Both About Now.