Jump to content

Module:Convert to eastern arabic numerals/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TartarTorte (talk | contribs) at 02:32, 28 December 2021 (Add documentation). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This module converts from Western Arabic numerals (i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) to Eastern Arabic numerals (i.e. ٩ ,٨ ,٧ ,٦ ,٥ ,٤ ,٣ ,٢ ,١ ,٠)

Usage

From wikitext

This should generally be invoked from the corresponding template {{Eastern arabic numerals}}; however it make be directly invoked as well

{{#invoke:Convert to eastern arabic numerals|convert|3.1415}}

From Lua

Load the module with the following code:

local mConvertNumerals = require('Module:Convert to eastern arabic numerals')

And then from there you can convert using the convert_str function.

mConvertNumerals.convert_str("3.1415")