The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
Created: 02/15/12
Last CDN Push: 03/23/12
Build Tag: gallery-2012.03.23-18-00
Project: YUI 3
License: YUI BSD
YUI Version: 3.4.1
Free for use.
As we need to support users who input arabic numerals and extended arabic numerals (e.g. users who type in arabic on Mac OS, or IOS, ... ). This library provides functions to help with that.
This Module provides a ParseInt, and a ParseFloat, that handles the (Extended) arabic-Indic digits (with the original European digits). Also provides textToArabicNumerals and textToExtendedArabicNumerals to add change numbers in a string to(Extended) Arabic-Indic.
This library currently provides 4 functions
* Y.Intl.parseInt: works like parseInt, but also considers the Arabic-Indic, and Extended Arabic Indic digits.
* Y.Intl.parseFloat: works like parseFloat, but also considers the Arabic-Indic, Extended Arabic Indic digits, and the Arabic decimal point "Ù«" .
* textToArabicNumerals: changes numbers in the string to be Arabic.
* textToExtendedArabicNumerals: changes numbers in the string to be Arabic.
<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.03.23-18-00'
}).use('gallery-intl-arabicnumerals', function(Y) {
alert(Y.Intl.parseInt("١٢٣٤٥",10));
alert(Y.Intl.parseFloat("٣٫١٤"));
alert(Y.Intl.textToArabicNumerals("15/2/2012"));
alert(Y.Intl.textToExtendedArabicNumerals("15/2/2012"));
});
All code on this site is licensed under the BSD License unless stated otherwise.