2009/7/11 David Danier <goliath.mailingl...@gmx.de>:
> Hi Marc, hi Gonzalo, hi django-dev,
[...]
> So I thought about how model translations in django could work, and how
> this should be used by the developer. I send this email directly to
> Marc, because he is currently working on some i18n-stuff (GSoC). Gonzalo
> seems to be interested in an official solution
> (http://groups.google.com/group/django-developers/msg/0be7de2c154aa49d?utoken=lffASzEAAABAWiol0apP9nFxQklB-_Jkc1-9iUSAb45YspdDeB6HhPWDe8H4lvYuxY4dyvcAHxqMKN2o9YZfQ4UFyks_AAUi),
> so you might be interested in some discussion about this. Perhaps
> Malcolm should be asked about how my proposal fits into the django ORM,
> as he has (re)written most of the ORM (-> queryset-refactor).

Hi David, sorry for the late answer.

I like your proposal! You simplified some over designed or complex
stuff about my original proposal and added some very neat ideas, good
work.

> 4. Special case: Create an own model for translations (like 2), but use
> the original table for some kind of DEFAULT_LANGUAGE. (pluggable-model-i18n)
>   I kind of like this, not only because you are able to enhance
> third-party-apps. Independent from that I think translations.register()
> seems to be a nice idea. But(!) this complicates things to much. You
> have to choose whether you want a field out of the DEFAULT_LANGUAGE or
> not for every field access/query.

This is the only thing I think deserves a second thought. It might
complicate thinks a little bit but it's very nice to be able to have
the model's default language translation loaded without needing the
JOIN, you don't have to check if its the default language or not, what
this does it to check if the translation is loaded (cached), defaults
will allways be loaded and this should be seen as an optimitation for
the common case .

If users have all models translations configured using
DEFAULT_LANGUAGE as default language and this matches the most used
lang (as it should) the content i18n overhead won't be that big most
of the time, this is very important. Also It could optionally be used
as an efficient fallback for missing traslations (a very common
configuration).

I look forward to hearing more ideas and continue this discussion here
and on IRC and since I will have more free time to work on this now, I
will start to study some django internals and take out the useful
stuff from pluggable-model-i18n.

Greetings,
-- 
Gonzalo Saavedra

--~--~---------~--~----~------------~-------~--~----~
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 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to