Thursday, 8 August 2013

Localization of numeric number in Rails

Localization of numeric number in Rails

[Sorry for the new post, but my first one was focusing to arabic/persian
numbers but it seems the issue is larger.]
I wonder if someone had done a gem to handle the localization of numeric
number in ruby/rails. I18n official locales
(https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale) seems
not to take care of that.
It's kind of complex to do by helpers.
Arabic is simple:
٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨
٩
Persian too:
۰ ١ ۲ ۳ ۴ ۵ ۶
۷ ۸ ۹ ۱۰
But all languages don't match 1-1 conversion with english, Chinese for
example:
0: ©– (Áã) l¨ªng
1: Ò» (Ò¼) y¨©
2: ¶þ (Simplified:·¡;Traditional:ÙE) ¨¨r
3: Èý (Simplified:Èþ;Traditional:…£¡¢…¢) s¨¡n
4: ËÄ (ËÁ) s¨¬
5: Îå (Îé) w¨³
6: Áù (Simplified:½;Traditional:ê') li¨´
7: Æß (Æâ) q¨©
8: °Ë (°Æ) b¨¡
9: ¾Å (¾Á) ji¨³
10: Ê® (ʰ) sh¨ª
100: °Ù (°Û) b¨£i
1000: ǧ (Ǫ) qi¨¡n
10,000: Simplified:Íò;TraditionalÈf w¨¤n
100,000,000: Simplified:ÒÚ;Traditionalƒ| y¨¬
1,000,000,000,000: Õ× zh¨¤o
We have other language with similar issues. It seems weird that nobody
seems to have face that before.

No comments:

Post a Comment