zope.i18n/z3c.form: Date localizing problems

View: New views
1 Messages — Rating Filter:   Alert me  

zope.i18n/z3c.form: Date localizing problems

by dusty128 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I'm currently implementing a simple date widget/field (birth date) in my
z3c.form - based form. My two main languages are Englisch and German.

In German, I'd like to write the date such as dd.mm.yyyy
And in English, something suitable would be something like mm/dd/yyyy.

However, that does not seem to be possible. By default, the german format
is "short", which is "dd.mm.yy" (inappropriate for a birth date). If I
override the format to "medium" with something like this:

-----------------
class BSPDateDataConverter(DateDataConverter):
    """Better representation"""
    length = 'medium'
------------------
  <adapter
      factory="zbsp.main.BSPDateDataConverter"
      />
----------------

then the german date is fine, but the "medium" english date is in a format
such as "MMM d, yyyy", which is e.g. "Sep 21, 1980". This is probably a date
format nobody will be able to enter, I assume?

Is there a way to make this work for both languages?

Best Regards,
Hermann

--
hermann@...
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@...
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )
LightInTheBox - Buy quality products at wholesale price!