|
@@ 530-539 (lines=10) @@
|
| 527 |
|
$human_format_amount = $amount; |
| 528 |
|
|
| 529 |
|
switch ( $args['currency'] ) { |
| 530 |
|
case 'INR': |
| 531 |
|
// Calculate large number formatted amount. |
| 532 |
|
if ( 4 < $amount_count_parts ) { |
| 533 |
|
$human_format_amount = sprintf( esc_html__( '%s arab', 'give' ), round( ( $sanitize_amount / 1000000000 ), 2 ) ); |
| 534 |
|
} elseif ( 3 < $amount_count_parts ) { |
| 535 |
|
$human_format_amount = sprintf( esc_html__( '%s crore', 'give' ), round( ( $sanitize_amount / 10000000 ), 2 ) ); |
| 536 |
|
} elseif ( 2 < $amount_count_parts ) { |
| 537 |
|
$human_format_amount = sprintf( esc_html__( '%s lakh', 'give' ), round( ( $sanitize_amount / 100000 ), 2 ) ); |
| 538 |
|
} |
| 539 |
|
break; |
| 540 |
|
default: |
| 541 |
|
// Calculate large number formatted amount. |
| 542 |
|
if ( 4 < $amount_count_parts ) { |
|
@@ 540-548 (lines=9) @@
|
| 537 |
|
$human_format_amount = sprintf( esc_html__( '%s lakh', 'give' ), round( ( $sanitize_amount / 100000 ), 2 ) ); |
| 538 |
|
} |
| 539 |
|
break; |
| 540 |
|
default: |
| 541 |
|
// Calculate large number formatted amount. |
| 542 |
|
if ( 4 < $amount_count_parts ) { |
| 543 |
|
$human_format_amount = sprintf( esc_html__( '%s trillion', 'give' ), round( ( $sanitize_amount / 1000000000000 ), 2 ) ); |
| 544 |
|
} elseif ( 3 < $amount_count_parts ) { |
| 545 |
|
$human_format_amount = sprintf( esc_html__( '%s billion', 'give' ), round( ( $sanitize_amount / 1000000000 ), 2 ) ); |
| 546 |
|
} elseif ( 2 < $amount_count_parts ) { |
| 547 |
|
$human_format_amount = sprintf( esc_html__( '%s million', 'give' ), round( ( $sanitize_amount / 1000000 ), 2 ) ); |
| 548 |
|
} |
| 549 |
|
} |
| 550 |
|
|
| 551 |
|
return apply_filters( 'give_human_format_large_amount', $human_format_amount, $amount, $sanitize_amount ); |