Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: cat on Fri 13/08/2010 23:00:47

Title: Translating Properties
Post by: cat on Fri 13/08/2010 23:00:47
Hi!

I have a GUI that relies on text properties for objects and hotspots. Is there a possibility to translate those texts? The description text of the object is translated, the property text not.
Afaik there are no messages anymore, so saving a messagenumber instead of the text is no option either. Any ideas?
Title: Re: Translating Properties
Post by: Dualnames on Sat 14/08/2010 00:26:38
Quote from: Audrey 'cat' Hepburn on Fri 13/08/2010 23:00:47
Hi!

I have a GUI that relies on text properties for objects and hotspots. Is there a possibility to translate those texts? The description text of the object is translated, the property text not.
Afaik there are no messages anymore, so saving a messagenumber instead of the text is no option either. Any ideas?

So you have lets say buttons that have text, and of course you can translate the texts, but you also want to translate a bsave to bsavoir? I'm probably dumb, but I can't really get what you're trying to do.
Title: Re: Translating Properties
Post by: Calin Leafshade on Sat 14/08/2010 00:32:47
No, she means the Custom Properties not gui control names.

As for translating them I'm not sure since they aren't editable at runtime.
Title: Re: Translating Properties
Post by: Wyz on Sat 14/08/2010 00:33:53
Unless newer versions support it, the versions I've worked with have them read-only at run-time. :(
Title: Re: Translating Properties
Post by: GarageGothic on Sat 14/08/2010 01:06:33
Does the property text turn up in the translation source file, and if it does, have you tried acquiring it using GetTranslation(oMyObject.GetTextProperty("myproperty"))? Otherwise - in case it doesn't show up in the translation, try adding the source text along with the translation and then try the same. [Disclaimer: I have no idea if this is advisable, proceed at own risk]

Whether the property itself can be edited at runtime or not shouldn't be relevant to whether the String contained therein can be translated before display.
Title: Re: Translating Properties
Post by: Khris on Sat 14/08/2010 03:30:57
Wait, what?
Why would you want to translate what's essentially variable names?
Title: Re: Translating Properties
Post by: GarageGothic on Sat 14/08/2010 03:37:57
Quote from: Khris on Sat 14/08/2010 03:30:57Why would you want to translate what's essentially variable names?

I took it to mean the String stored in the text property, not the property name itself. Though you never know.
Title: Re: Translating Properties
Post by: cat on Sat 14/08/2010 14:03:52
Ok, i think some clarification is needed. I use a different custom gui where you click on an object/hotspot and a box openes with the normal description text on top and below some detailed description text. So in room editor, I just add an object, set the description and the details propertytext and without additional coding, the popup box shows description and details.

The property texts are not in the translation file.

I thought about making an array with those texts and storing the index of the text in the details property, but maybe there is another (more elegant) solution.