Dear developers,

I'd like to suggest an addition to the Django Model definitions to ease the 
implementation of translatable model fields. There are currently several 
third-party applications for model translation, and even if I think we are 
not ready yet to bless one of them to be included in core Django, I would 
suggest the following features which could then be used by several 
different applications (or custom one).

1. Add a `translatable` Meta option with a list/tuple/set of translatable 
field names.
2. Add a `translatable_fields` cached property to meta Options classes to 
get a list of a model translatable field instances.

Each app could then use those elements to implement its own version of the 
model translation functionality. The problem with the current situation is 
that custom or third-party apps have to find not-always-pretty workarounds 
to mark which field of a model can be translated. It's a bit unusual to 
introduce data structures in Django which have no direct use by Django 
itself, but I think this could help the Django ecosystem in general.

I'm looking forward to your feedback.

Claude

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a5596123-7a1b-4661-8a1a-d91aea3a4a50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to