News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Changing currency

Started by austin4, March 27, 2025, 08:09:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

austin4

Hi, I'm currently playing using the latest version of Simutrans (and Pak128.Britain). The currency displays as a '$' at the moment. I was wondering if it was possible to change this to a '£'. I tried looking around the various .tab files, but I haven't come across it anywhere yet.

ceeac

This is currently hard-coded (https://github.com/simutrans/simutrans/blob/master/src/simutrans/utils/simstring.cc#L131), but this is not too difficult to make this configurable.

Leartin

Shouldn't it be translateable? Or would that impact performance, since money is used so often?

prissi

Since most of it comes from the money to string, which obeys also predefined 000 separators, the impact would be minimal.

Isaac Eiland-Hall

And now I'm tempted to start the emoji-language translation. :D

Yona-TYT

Quote from: Isaac Eiland-Hall on March 30, 2025, 01:48:50 AMAnd now I'm tempted to start the emoji-language translation. :D
Emojis, huh? That seems like a really cool idea to me, and with that we'd beat a lot of games that don't allow emojis in their chats. This is good for communicating with cultures that use other alphabets.  8)

prissi

r11667 has now a string CURRENCY which will translate to € or $ for most languages.

Leartin

Would it be possible to have it as a parameterized string? Depending on the currency, it might be more common to append or prepend it - it's minor, but if not now, it will certaibly never be done down the line.

prissi

But then let it be to the user (see r11670).