On 12.07.2007., at 00:55, [EMAIL PROTECTED] wrote:

> The initial version of this could be done as a third party addon as
> well. There might be some issues with DB back ends that I have not
> thought of, but I doubt it.
> What this entails:
>     1. new MultiLangTextField and MultiLangCharField # might be a
> minor max length issue here
>     2. newforms fields and widgets for them
>     3. admin template extensions for them
>     4. not sure how validation would work, would depend on the
> widgets.

Except that we need support (and this is for now a show-stopper) that  
this fields behave, well ... as a fields:

5. unique and unique_together support
6. sorting, querying
7. separate blank=True|False per language - ex. primary language  
field is required, de translation also and es, en and pt are not.
8. set of get_FIELD_translated (or something with better name)  
methods for getting field value translated to the current lang --  
property access is nice but get_ follows current convention that all  
access that can hit database is explicit (related fields are exception).

> The really adventurous could implement i18n lookups to auto-fill the
> languages which are left empty.

Easy doable, just use ugettext as a last resort when trying to get  
field translation.

> This is not simple work, but I think it can be done, and without
> changing the django core.

Hardly, File/Image fields are somewhat special case in the ORM so we  
need more general way to define this type of fields (one declaration  
-- multiple database columns).

If we can implement this transparently we will get THE best i18n web  
framework :)

-- 
Nebojša Đorđević - nesh, ICQ#43799892, http://www.linkedin.com/in/ 
neshdj
Studio Quattro - Niš - Serbia
http://studioquattro.biz/ | http://code.google.com/p/django-utils/
Registered Linux User 282159 [http://counter.li.org]



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
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