• Resolved meckerlax

    (@meckerlax)


    Hi!

    It is possible to display the share price and rate of change in the German decimal form (international format: xx,xxx.xx $; German format: xx.xxx, xx $)?

    Thanks

    Max

    • This topic was modified 8 years, 1 month ago by meckerlax.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hello @meckerlax

    At the moment, you’ll need to edit core plugin file stock-quote.php and do couple changes:

    #1: find line with comment // Define class based on change. and add below that line:

    $prefix = '';

    #2: find line } elseif ( $q_change > 0 ) { and add below that line:

    $prefix = '+';

    #3: find line with comment // Text. and add below that line:

    
    					$q_price   = number_format( $q_price, 2, ',', '.' );
    					$q_change  = $prefix . number_format( $q_change, 2, ',', '.' );
    					$q_changep = $prefix . number_format( $q_changep, 2, ',', '.' );
    

    Save file and upload to server. You should get what you ask for. Example screenshot https://goo.gl/r6kMqz

    Kind regards,
    Aleksandar

    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hi Max,

    I released version 0.1.6 with implemented options to choose number format and even amount of decimal places. You can try it, if you like.

    Cheers,
    Aleksandar

    Thanks Aleksandar!
    It will be great to have it as a shortcode parameter. This way I would display it differently on a multilingual wordpress.

    Antoine

    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hello @ceer,

    Just releassed version 0.1.7 which now have two new shortcode parameters:
    * decimals to override default number of decimal places for values (default from settings page used if no custom set by shortcode). Valid values are: 1, 2, 3 and 4
    * number_format to override default number format for values (default from this settings page used if no custom set by shortcode). Valid options are: cd for 0.000,00; dc for 0,000.00; sd for 0 000.00 and sc for 0 000,00

    Cheers,
    Aleksandar

    Wow great! Thanks a lot @urkekg.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘German decimal format’ is closed to new replies.