Hi all,

A Farsi-localized Django site I'm working on will need Farsi digits,
so I'm looking for a solution for replacing digits with their
localized counterparts.

The GNU gettext has support for localized digits using the 'I' flag on
numerical format variables, e.g. "%Id". Unfortunately this works only
for glibc, and then even not in Python. Furthermore, all template
translations are based on string.

As a starting point I created a template filter that does the
replacing [1] (only for Arabic and Farsi at the moment), and now I'm
looking for the correct place to integrate localized digits into the
Django translation system. I thought the best place to integrate such
a function would be django.utils.translation.trans_real.py in function
ugettext (because localized digits will always be in unicode). Also,
localized dates would need to pass the replacement function. I'm also
not sure were the digits would be stored: django.utils.translation?
django.contrib.localflavor?

Would this be the correct way to go about it?

Regards,

Joost

[1] http://www.djangosnippets.org/snippets/980/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to