The International Simutrans Forum

PakSets and Customization => Pak128.Britain => Topic started by: austin4 on March 27, 2025, 08:09:38 AM

Title: Changing currency
Post by: austin4 on March 27, 2025, 08:09:38 AM
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.
Title: Re: Changing currency
Post by: ceeac on March 29, 2025, 07:12:44 AM
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.
Title: Re: Changing currency
Post by: Leartin on March 29, 2025, 08:38:16 AM
Shouldn't it be translateable? Or would that impact performance, since money is used so often?
Title: Re: Changing currency
Post by: prissi on March 29, 2025, 11:36:42 AM
Since most of it comes from the money to string, which obeys also predefined 000 separators, the impact would be minimal.
Title: Re: Changing currency
Post by: Isaac Eiland-Hall on March 30, 2025, 01:48:50 AM
And now I'm tempted to start the emoji-language translation. :D
Title: Re: Changing currency
Post by: Yona-TYT on March 30, 2025, 08:06:18 PM
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)
Title: Re: Changing currency
Post by: prissi on April 03, 2025, 05:11:29 AM
r11667 has now a string CURRENCY which will translate to € or $ for most languages.
Title: Re: Changing currency
Post by: Leartin on April 03, 2025, 09:08:27 AM
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.
Title: Re: Changing currency
Post by: prissi on April 03, 2025, 01:35:26 PM
But then let it be to the user (see r11670).