Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Sledgy on Fri 01/08/2014 17:55:05

Title: How to translate textbox?
Post by: Sledgy on Fri 01/08/2014 17:55:05
Can some new AGS engine do it?


It used extra script - Parser.asc with lines as

Code (ags) Select
if (S=="look") Display("Look command");


I need to translate 'look' to 'smotri' (for ex). I can translate Display's text via TRA, but I can't do it with 'look', although this word exists in TRS

Bug?
Title: Re: How to translate textbox?
Post by: Crimson Wizard on Fri 01/08/2014 18:01:02
Use "GetTranslation":
Code (ags) Select

if (S==GetTranslation("look")) Display("Look command");


Although, in my opinion, this direct approach does not work well for parsers, because every language may have different number of synonims. I'd rather implement some kind of dictionary system and use numeric IDs to define action... Just a thought.