Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2629

[3.3.x] Translations • Re: How do I get "%2$.2f seconds" to show "1,23" instead of "1.23"

$
0
0
Someone with more php knowledge should be able to advise you better but it's my understanding that this string is specifically used for outputting floats which should always be X.YZ in formation, such as 1.23 or 45.67 or 789.00.

This language string relies on the php sprintf function which allows you to specify a string of text and include placeholders for dynamic data where $1%s is the first placeholder expecting a string (ie. Hello World) and $2%.2f is the second and is expecting a float (ie. 12.34).

Therefore you can't simply change this from a period to a comma because that's not going to be accepted by the php function when it comes to replacing the placeholders with the data.

Your best bet is to use something like number_format after the text has been replaced, not by trying to update the string in a language file.

Statistics: Posted by danieltj — Sun Aug 18, 2024 7:32 pm



Viewing all articles
Browse latest Browse all 2629

Latest Images

Trending Articles



Latest Images