Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: fslz on Sun 21/05/2017 17:00:02

Title: Issues with .trs translation file (mixed english and original language)
Post by: fslz on Sun 21/05/2017 17:00:02
Hi folks! :)
After filling up the translation text file, by alternating original lines with the respective translations, all the hotspots, gui's and buttons are correctly translated.
For the speech we used the .DisplayAt function instead of the .Say one and that's where shit hits the fan: most of them are translated but there's a few of them that keep being in their original version.
We updated, compiled and double checked the .trs file, and we were not able to find any solution to this.
Any help is much appreciated, thanks in advance.



Title: Re: Issues with .trs translation file (mixed english and original language)
Post by: Mandle on Mon 22/05/2017 14:22:28
I usually find that this is a problem with a mistake in the way the TRS file was handled:

Look for line breaks where there shouldn't be any, or missing line breaks where there should be...

The TRS is a delicate beast...
Title: Re: Issues with .trs translation file (mixed english and original language)
Post by: CrashPL on Tue 23/05/2017 10:20:36
Just like Mandle says, one of the things to remember, while handling the *.trs file, is the space at the end of the string - if the original string happens to have a space at the very end, it won't be translated. I remember spending a good amount of time wondering why "Acquired " kept displaying in English, while doing the translation... Maybe that's the cause here?
Title: Re: Issues with .trs translation file (mixed english and original language)
Post by: Crimson Wizard on Wed 24/05/2017 15:32:28
I think I'd mention just in case that not all strings get automatically translated. For example, string formatting arguments are not.

Code (ags) Select

String s = "Red";
Display("My favourite color is %s", s); // "My favourite color" will be translated, but "Red" won't be.


For these you'd need to do something like this:
Code (ags) Select

String s = "Red";
Display("My favourite color is %s", GetTranslation(s)); // Now both parts will be translated