
![All conversion formats rendered on the front-end with the <code>[ntb_num]</code> shortcode.](https://ps.w.org/number-to-bangla/assets/screenshot-1.png?rev=3588249)
All conversion formats rendered on the front-end with the <code>[ntb_num]</code> shortcode.
Number to Bangla converts English numbers into Bangla in many formats. Use it with the [ntb_num] shortcode, the “Number to Bangla” and “Bangla Clock” Gutenberg blocks, the REST API (including batch conversion), an Elementor dynamic tag, the wp ntb convert WP-CLI command, or directly from your theme with template helper functions.
Supported formats:
111 ১১১)1345.05 এক হাজার তিন শত পঁয়তাল্লিশ দশমিক শূন্য পাঁচ)1345.50 এক হাজার তিন শত পঁয়তাল্লিশ টাকা পঞ্চাশ পয়সা)121212121 ১২,১২,১২,১২১)75 ৭৫ শতাংশ (add words="true" for spelled-out)12 ডিসেম্বর)1 বৈশাখ)2024-04-14 ১ বৈশাখ, ১৪৩১)1 গ্রীষ্ম)monday সোমবার)2024-01-15 ১৫ জানুয়ারি, ২০২৪)2024-01-01 ১)14:30 ১৪:৩০, or words দুপুর দুইটা ত্রিশ মিনিট)3665 ১ ঘণ্টা ১ মিনিট ৫ সেকেন্ড)1990-01-15 ৩৫ বছর …)1 ১ম, 25 ২৫তম)১২৩৪৫ 12345)Shortcode:
[ntb_num value="111" format="word"] → `এক শত এগারো`
Optional attributes: prefix, suffix, words (for percentage/time), date_format (for date), as_of (for age).
[ntb_num value="2024-01-15" format="date" date_format="d/m/Y"] → `১৫/০১/২০২৪`
[ntb_num value="123" format="ordinal" prefix="অবস্থান: "] → `অবস্থান: ১২৩তম`
Blocks:
Add the “Number to Bangla” block in the editor and choose a value and format. Output is rendered live. The “Bangla Clock” block shows a live-ticking clock in Bangla digits (optionally with seconds).
REST API:
GET /wp-json/ntb/v1/convert?value=1345.50&format=money
Convert several values in one request with the batch endpoint (max 100 items):
POST /wp-json/ntb/v1/batch
{"items":[{"value":"111","format":"word"},{"value":"2024-01-15","format":"bengali-date"}]}
WP-CLI:
wp ntb convert 111 –format=word
wp ntb convert 2024-01-15 –format=bengali-date
Elementor:
When Elementor is active, a “Number to Bangla” dynamic tag is available under the Text category for any text field.
Template helpers (PHP):
ntb_to_word( 111 ), ntb_to_number( 111 ), ntb_to_money( 1345.50 ), ntb_to_date( '2024-01-15' ), ntb_to_bengali_date( '2024-01-15' ), ntb_week_number( '2024-01-15' ), ntb_ordinal( 25 ), and the generic ntb_convert( $value, $format, $args ).
Developers can filter output via the ntb_convert_output filter.