Latin To Arabic Number Converter - jQuery latin2Arabic

File Size: 2.91 KB
Views Total: 1562
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Latin To Arabic Number Converter - jQuery latin2Arabic

Yet another jQuery based Latin To Arabic converter which makes it easier to convert Latin numbers into Arabic-Indic numbers and vice versa.

How to use it:

1. Just download and insert the JavaScript file latin2Arabic.jquery.js after jQuery library and you're ready to go.

<script src="https://code.jquery.com/jquery-1.12.4.min.js" 
        integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" 
        crossorigin="anonymous">
</script>
<script src="latin2Arabic.jquery.js"></script>

2. Convert certain latin numbers into Arabic-Indic numbers.

$(function() {
  var numbers = $.latin2Arabic.toArabic('1/2/3');
  $( body ).append( numbers );
});

3. This will result in...

١/٢/٣

4. If you want to convert the Arabic to Latin.

$(function() {
  var numbers = $.latin2Arabic.toLatin('١/٢/٣');
});

5. If you want to convert the Arabic to html entities.

$(function() {
  var numbers = $.latin2Arabic.toHtml('١/٢/٣');
});

This awesome jQuery plugin is developed by meezaan. For more Advanced Usages, please check the demo page or visit the official website.