# Introduction: i18n and django
# This is a nasty issue: on Python 2.3 gettext expects either ascii
# or unicode. While on Python 2.4 gettext can deal with utf-8 encoded
# strings too.
# One is encouraged to use unicode on strings all the time but this
# breaks django (0.95.1) in many places where it expects objects to
# to work with ``str''. This leaves your code quite inconsitant, as
# your strings are sometimes marked as unicode and sometimes not --
# everywhere wehre django would want to call ``str'' on your object.
# Stupid quickfix: Let gettext handle utf-8 strings. on fail
# convert them to unicode. (this lets you use non unicode all over
# the place if you use the _() function for translation.
trans = _
# probably better: change all strings into utf-8 for djangos internal handling.
# this though requires the _() handle on every! string. But you could (once
# django is true unicode, just drop this wrapper and be happy :))
# return e(trans(o),encoding)