跳到内容

Sankhyaank

v1.0.0

Rahul Tank · 2026年10月6日 上架

Show numbers the Indian way: 12,34,567, 12.35 lakh or 2 crore, with the rupee sign and Gujarati or Devanagari digits.

正在使用
10 以下
评分
暂无
累计下载
412
最近更新
2026年10月6日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

贡献者

WordPress groups digits in threes (1,234,567). In India the same number is written 12,34,567, and large amounts are usually read in lakh and crore.

Sankhyaank (“sankhyaank” means numeral in Hindi and Gujarati) adds a shortcode that writes a number in the Indian numbering system:

  • [sankhyaank value="1234567"] 12,34,567
  • [sankhyaank value="1234567" style="words"] 12.35 lakh
  • [sankhyaank value="20000000" style="words"] 2 crore
  • [sankhyaank value="250000" currency="inr"] ₹2,50,000
  • [sankhyaank value="1234567" digits="gujarati"] ૧૨,૩૪,૫૬૭
  • [sankhyaank value="1234567" digits="devanagari"] १२,३४,५६७

Shortcode options

  • value – the number. Commas and spaces in it are ignored.
  • style – digits (default) for 12,34,567, or words for thousand, lakh and crore.
  • decimals – how many decimal places to show. By default the number keeps its own decimals, and words uses up to 2.
  • digits – latin (default), gujarati, devanagari, or auto to use Gujarati digits on a Gujarati site and Devanagari digits on a Hindi or Marathi site.
  • currency – inr to add the rupee sign.

Large numbers stay exact, because the formatting works on the digits as text instead of converting them to a floating point number.

The words thousand, lakh and crore can be translated, so a site in Gujarati or Hindi can show them in its own language once translations are available.

For developers

Use the same formatting in a theme or plugin:

echo esc_html( Sankhyaank::format( 1234567, array( 'style' => 'words' ) ) );

The plugin has no settings, stores nothing in the database and does not contact any external service.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums