@@ 501-510 (lines=10) @@ | ||
498 | $human_format_amount = $amount; |
|
499 | ||
500 | switch ( $args['currency'] ) { |
|
501 | case 'INR': |
|
502 | // Calculate large number formatted amount. |
|
503 | if ( 4 < $amount_count_parts ) { |
|
504 | $human_format_amount = sprintf( esc_html__( '%s arab', 'give' ), round( ( $sanitize_amount / 1000000000 ), 2 ) ); |
|
505 | } elseif ( 3 < $amount_count_parts ) { |
|
506 | $human_format_amount = sprintf( esc_html__( '%s crore', 'give' ), round( ( $sanitize_amount / 10000000 ), 2 ) ); |
|
507 | } elseif ( 2 < $amount_count_parts ) { |
|
508 | $human_format_amount = sprintf( esc_html__( '%s lakh', 'give' ), round( ( $sanitize_amount / 100000 ), 2 ) ); |
|
509 | } |
|
510 | break; |
|
511 | default: |
|
512 | // Calculate large number formatted amount. |
|
513 | if ( 4 < $amount_count_parts ) { |
|
@@ 511-519 (lines=9) @@ | ||
508 | $human_format_amount = sprintf( esc_html__( '%s lakh', 'give' ), round( ( $sanitize_amount / 100000 ), 2 ) ); |
|
509 | } |
|
510 | break; |
|
511 | default: |
|
512 | // Calculate large number formatted amount. |
|
513 | if ( 4 < $amount_count_parts ) { |
|
514 | $human_format_amount = sprintf( esc_html__( '%s trillion', 'give' ), round( ( $sanitize_amount / 1000000000000 ), 2 ) ); |
|
515 | } elseif ( 3 < $amount_count_parts ) { |
|
516 | $human_format_amount = sprintf( esc_html__( '%s billion', 'give' ), round( ( $sanitize_amount / 1000000000 ), 2 ) ); |
|
517 | } elseif ( 2 < $amount_count_parts ) { |
|
518 | $human_format_amount = sprintf( esc_html__( '%s million', 'give' ), round( ( $sanitize_amount / 1000000 ), 2 ) ); |
|
519 | } |
|
520 | } |
|
521 | ||
522 | return apply_filters( 'give_human_format_large_amount', $human_format_amount, $amount, $sanitize_amount ); |