question about currency.php format function

  • Posts: 1
  • Thank you received: 0
10 years 5 months ago #161761

there is possibility to make complex overrides to currency displaying format
Can you explain syntax of a string which i should put into $format_override ))

Subj:
function format($number,$currency_id=0,$format_override='')

More Deeply:
It shows Code instead of a Symbol after format function
I want to change it so it will show '50 руб' instead of '50 RUB'.
ThX in advance.

Last edit: 10 years 5 months ago by Winterviking.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 4 months ago #161776

Hi,

In the integrated documentation you can find the different format types.

Format : The way you want to display the symbol (basically you will have %i which will display the currency code next to the price, %n which will display the currency symbol next to it, and %ni which will display both). For more information, you can look at www.php.net/manual/en/function.money-format.php


So to use the symbol instead of the code, you have to set the format %n in the settings of your currency via the menu System > Currencies.

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum