Hello Remco,

A subset of what you are looking for is provided by this library:
  * http://code.google.com/p/django-multilingual/

I found it very easy to work with hand I was able to modify flatpage
(since this was what I was looking) in a very small amount of time.
What it will bring to you :
  * a nice admin interface to handle your multilingual content
  * The right language will be served to your user
An exemple of it can be found there : http://yml.alwaysdata.net
The content is available in 2 languages french and english.
  * I am also missing some icons to see the current language and other
languages available. Of course you could jump from one to the other by
clicking on it....

I hope that will help you.

What it will not do :
 * easy to connect the same article in both languages (no idea on how
to do that)
 * the language in the url (also they were some discussion about it
there : 
http://groups.google.com/group/django-multilingual/browse_frm/thread/b05fc30232069e1d)
The output is not yet completely clear to me
  *


On Dec 12, 4:46 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi Remco,
>
> <snip>...
>
>
>
> > Now, the question. I see two obvious way to model this. Say my blog has an
> > 'Article' model.
>
> > Then:
>
> > - Either two different versions are separate Articles, the article has a
> > language code, and it has optional fields 'this_article_in_dutch' and
> > 'this_article_in_english', that lead to the other version, if it exists.
>
> > or
>
> > - One article holds both versions; they share a creation date, and have
> > separate fields for 'context_dutch' and 'content_english', same for title
> > and slug.
>
> > I think it should be the first. But I was wondering what other approaches
> > others have taken, I can't be the first one with this sort of issue.
>
> Another way of modeling this:
>
> class ArticleContainer(Model):
>     "Language neutral container for an article"
>     slug = SlugField(unique=True)
>
> class Article(Model):
>     "Language specific article"
>     container = ForeignKey(ArticleContainer)
>     lang = CharField(max_length=2, db_index=True)
>     #title = ...
>
>     class Meta:
>         unique_together = (('container', 'lang'),)
>
>     def other_versions(self):
>         return self.container.article_set.exclude(pk=self.pk)
>
>     def comments(self):
>         return self.container.comment_set.all()
>
> > Comments are an issue. In principle I'd want comments to one article also
> > appear under the other, language doesn't matter. But I'm not sure.
>
> class Comment(Model):
>     "Comments are common to all language flavors of an article"
>     container = ForeignKey(ArticleContainer)
>     #comment = ...
>
> It's also possible to turn the Article.lang field into a ForeignKey to
> a Language reference object if you foresee needing to hang other
> objects off of a particular language.
>
> -Rajesh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to