the3dfxdude / 7kaa

Seven Kingdoms: Ancient Adversaries - Go to the main source repository at https://sourceforge.net/projects/skfans/ for source code and builds
https://7kfans.com
Other
253 stars 71 forks source link

Polish language wrong displayed #237

Closed Lishoo closed 2 years ago

Lishoo commented 2 years ago

Hello, I just downloaded and run the 7KAA, and I was surprised that there are Polish captions, but unfortunately they are hard to understand because of the Polish special characters are wrong displayed, if there is a fix for that, it would be awesome, but if it is hard to fix, than maybe just replace the special characters to the normal substitute. 2022-04-08 2022-04-08 (1) 2022-04-08 (2)

the3dfxdude commented 2 years ago

So I initially thought you were on Linux, but yes, this seems to be what happens on Windows. This is provided by a third party library, so let me check on it.

the3dfxdude commented 2 years ago

So the issue is Windows is returning something we don't recognize. I can't give you a workaround for this on your version. I will fix so that at least the locale is selectable on Windows in the next version and improve on it more later.

the3dfxdude commented 2 years ago

You will be able to force the game to load the correct fonts so the accent marks are placed correctly in the next version. To do so, go to %appdata%\7kfans.com\7kaa and create a file called config.txt and open in notepad. Then add the line: locale=pl_PL

Closing on f15e48ca14e3f4d1b1d1a6ab330197bc146ad1d1

Lishoo commented 2 years ago

Thank you very much :)

Lishoo commented 2 years ago

Hi, I just compiled the game from sources and run it using SKDATA=data ./src/7kaa but the game is always in English, how to force the polish language? OK I found the solution, the locale folder was absent, I just copy it from the pre-compiled version

the3dfxdude commented 2 years ago

As mentioned before, but the path on linux is $HOME/.local/share/7kfans.com/7kaa. Create the config.txt there.

It does mean the LANG environment variable is now being ignored, and I'm not sure what to do since some people may be expecting LANG to be used, but some were complaining that the game was using their native language and preferred English instead.

Zalewa commented 2 years ago

You will be able to force the game to load the correct fonts so the accent marks are placed correctly in the next version. To do so, go to %appdata%\7kfans.com\7kaa and create a file called config.txt and open in notepad. Then add the line: locale=pl_PL

This doesn't solve the problem for me. The locale= setting works in general because when I set it to locale=ru I can see that the game uses a different font, but when I set it to locale=pl or locale=pl_PL, it doesn't fix the diacritics. They're just as broken as on OP's screenshots. Windows 10 platform, game versions 2.15.4p1 and 2.15.5.

But - is there a way to force the game to just use English, short of deleting the locale\pl directory? locale=C, locale=en_EN, locale=en, locale=en_US don't change the language. Notably, locale=ru doesn't set the language it should either.

the3dfxdude commented 2 years ago

So the change above makes the config.txt locale=xx setting be passed along exactly provided to select which font to use, if a specific language char set is needed, which makes it so we do not read the system language. Windows uses something non-standard, which is why there is this bug report, and the fix was to just ignore it and use the custom setting for the font too. The only languages we have additional char sets defined for are ru, pl, and eo. en' is part of the iso-8859-1 char set, so we support several languages there.

The game still defaults to try using whatever your OS says, which we might change, because it isn't reliable to use, but this really isn't our issue. So as long as you define locale= on Windows for plPL or en*, you will get what you expect. If you do not, then is there something wrong with your installation? Because if the font is missing, it won't work. I was just testing this, and it is working.

Zalewa commented 2 years ago

is there something wrong with your installation?

Adding the SHA1 checksums from 2.15.5 with older SDL due to the mouse scroll bug. 7kaa.sha.gz