The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Yona-TYT on August 16, 2021, 02:38:17 PM

Title: [Linux SDL2] The language obtained is incorrect
Post by: Yona-TYT on August 16, 2021, 02:38:17 PM
 Linux Mint 19.2 Tina de 64-bit and Linux 4.15.0-140-generic x86_64

When I start for the first time simutras the automatically obtained language is "Turkish", but the language of my system is "Es" or at least "En", but I have never used "Turkish".
Title: Re: [Linux SDL2] The language obtained is incorrect
Post by: Roboron on August 16, 2021, 02:52:18 PM
Since when does Simutrans pick the language automagically? It always asks me the first time I open it...
Title: Re: [Linux SDL2] The language obtained is incorrect
Post by: Yona-TYT on August 16, 2021, 02:56:46 PM
An update that the forum does not mention I think, but it only worked with SDL2, at least for linux.

Edit. https://github.com/aburch/simutrans/commit/686697c57c212b40fc1c7894ce995a20090f3e5d#diff-55059a177d58798bb7beea42f35d4f5cefda89c2c8cb37304b25a9ccc83e7c50
Title: Re: [Linux SDL2] The language obtained is incorrect
Post by: prissi on August 16, 2021, 03:10:45 PM
SInce turkish is mostly English due to lacking translation, it is not that bad ...

I added debug code. Btw. on windows it will use the windows code, not the SLD2 one as this only works on very recent SDL2 \versions (2.14). Start with -log -debug 3 and search for dr_get_local in the log file. It should show "es"
Title: Re: [Linux SDL2] The language obtained is incorrect
Post by: Yona-TYT on August 16, 2021, 03:51:25 PM
You are not getting the system language, as "dr_get_local" it does not appear in the log.  ???

Do you know what is the minimum SDL2 version required? mine says "2.0.12"
Title: Re: [Linux SDL2] The language obtained is incorrect
Post by: Andarix on August 16, 2021, 04:22:28 PM
Quote from: Yona-TYT on August 16, 2021, 03:51:25 PM
...
Do you know what is the minimum SDL2 version required? mine says "2.0.12"


2.0.14

https://forum.simutrans.com/index.php/topic,20954.0.html (https://forum.simutrans.com/index.php/topic,20954.0.html)
Title: Re: [Linux SDL2] The language obtained is incorrect
Post by: Roboron on August 16, 2021, 04:27:04 PM
Quote from: Yona-TYT on August 16, 2021, 02:56:46 PMAn update that the forum does not mention I think, but it only worked with SDL2, at least for linux.

Yeah, a compiled a recent version with SDL2 v2.0.14 and it worked as expected for me, it set the language to ES.
Title: Re: [Linux SDL2] The language obtained is incorrect
Post by: Yona-TYT on August 16, 2021, 05:33:38 PM
Quote from: Andarix on August 16, 2021, 04:22:28 PM
2.0.14

https://forum.simutrans.com/index.php/topic,20954.0.html (https://forum.simutrans.com/index.php/topic,20954.0.html)
That must be the problem . :P