Language problem: Contact form

  • natt
    Active member
  • Topic Author
  • New Member
  • New Member
More
1 year 1 month ago #50278 by natt
Replied by natt on topic Language problem: Contact form
  Hi :-)
I have already changed that.
But the problem is the "comma" in the numbers.
I also need a period as a separator

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
1 year 1 month ago #50282 by milos
Hello,

To change the number format, please edit files:

/templates/sparky_framework/html/com_content/featured/default_item.php
/templates/sparky_framework/html/com_content/category/blog_item.php
/templates/sparky_framework/html/com_content/article/default.php

and change this:
Code:
if( $field->label == "Price") { echo '<div class="price">' . $template->params->get('currencySymbol', '$') . number_format($field->value) . '</div>'; }

to this:
Code:
if( $field->label == "Price") { echo '<div class="price">' . $template->params->get('currencySymbol', '$') . number_format($field->value, 2, ',', '.') . '</div>'; }

In number_format function, there are 4 parameters:

$field->value -> this is value
2 -> this is number of decimal places
, -> decimal separator
. -> thousands separator

More details here: php.net/manual/en/function.number-format.php

Regards,
Milos
The following user(s) said Thank You: natt

Please Log in to join the conversation.

Time to create page: 0.282 seconds
Powered by Kunena Forum