Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Cone Arex

Ahh, now it works. If I set the language manually in acsetup it works with the Linux port. The whole thing was just a mistake of the language not being set correctly. I set the language by Building the exe and then running winsetup through the editor. So the selected language was not written in the acsetup.cfg that the Linux (and probably Android) port use. And I guess ScummVM is using it's own set configs. So, for the foreseeable future I will use a method like Khris suggested, as that should work everywhere.
QuoteIf i set it as "English" with capital E, then the title also switches to "Berthold's Return".
Yeah, I was still using case-sensitive check in the dummy game.  :-[ So that should be an easy fix.

What I still not get is why the actual translated text is still loaded without the language being set correctly in acsetup and how heltenjon got the error under Windows.  ???

In any case, thank you so much for your help!
QuoteCould you also tell, what version of a linux port are you using and where did you get it, to make sure we're testing same thing?
I just build the game for Linux and then executed the ags64 file. (Is this the right way? I always run into issues with ags and linux.) Version is ACI version

Quote from: Crimson Wizard on 07 Dec 2021, 23:47
In regards to the Game.TranslationFilename, to be certain I did another test with a dummy game that displays TranslationFilename on screen. Tried Linux ports for the latest builds of 3.5.0, 3.5.1 and 3.6.0, and all of them work correctly, displaying the selected language...
Strange. I did the same thing and it doesn't.
I tried it again with the Linux port and it has the same output. An empty string for TranslationFileName. (I used ScummVM for it ease of use. As itt has all the exact same issues as the Linux and Android ports of AGS.)
Oh, yes I misunderstood. -101 is of course the output of CompareTo.
The output of Game.TranslationFilename is indeed an empty string if played under ScummVM, but "English" when played under windows.
Finally, some progress. I displayed the output of both Game.ChangeTranslation("English") (which doesn't change anything regarding graphics) and Game.TranslationFilename.CompareTo("English"). ChangeTranslation correctly returns 1, while TranslationFIlename returns -101 under ScummVM, which is the same value that is returned under windows if no translation is selected/the default language is used.
Ah, I now understand what meant with "typed". You mean the introtext that is typed after you pressed Start. (The text is hardcoded because it's created dynamically.) I always thought the meant the title in the window.  :-D Thx again.
I've already had the idea that the problem is case-sensitivity.  :-D
I've now tried your code with CompareTo and in the past tried by just checking all lower case "english" as well as with an initial upper case. Nothing changes. It still works with Windows but nothing else. Interestingly (at least for me): The .tra file is spelled with all lower case, but the check only works with an initial upper case "English". Checking for "english" will not work with the case-sensitive == operator despite the file's name.
QuoteBut I don't remember exactly where it was introduced (it was fixed in 3.5.1 - Patch 1).
I upgraded my game to 3.5.1. Patch 4 but it doesn't change anything.

QuoteI used windows when I got the "German graphics".
Thx for your information. Do you happen to remember if the name in the title screen (not in the title window) was also untranslated? There are only these two graphics that are checked for translation.

QuoteIf you or another user know the actual case where graphic is not changed for translation, and have a save made around that moment in game, I could perhaps test this under debugger and see what's happening.
Doesn't need a save. The titlescreen itself has a translated graphic. I also know that the same problem exist with another game in the titlescreen and the packing list as it used the same method to check for the translation.
Quote from: Crimson Wizard on 06 Dec 2021, 17:23
To clarify, are you saying that this works on Windows, but not on other ports?
Yes. But I must point out that other people als had the issue that graphics weren't translated. I don't know if they were using windows or not.

Quote from: Crimson Wizard on 06 Dec 2021, 17:23
Could you tell which version of AGS are you using? Is "English" translation not default one, and present as a TRA file with your game?
I'm using AGS 3.5.0. Yes, English isn't the default one and present as TRA file.
I have a problem regarding the use of translations. Up to now, I have used

Code: ags

if (Game.TranslationFilename == "English")
        // Do stuff

to check for translation and display different graphics for different translations. But this doesn't seem to work all the time. There were people who saw the untranslated graphic of note despite having an active translation. While testing, I've noticed that the above checking never works when playing the game with the Linux, Android or ScummVM ports of AGS.

Someone told me to first use IsTranslationAvailable() and then compare strings to check which translation is used.
Code: ags

if (IsTranslationAvailable())
        if (GetTranslation("Bertholds Rückkehr") == "Berthold's Return")
                // Do stuff

I can confirm this works all the time or least I've yet to encounter problems with it. Thing is, that it isn't really good coding style.

Any advice? What is the "correct" way to display graphics depending on the selected translation?