Re: Best practice to build a multilingual site
I have the same question as you. Translation of dynamic content is not a feature for Django 1.1. I wonder if I can insert this feature in the wiki. I'd like to know the best approach for translating some fields of a model to different languages. Thank you. On 13 oct, 17:48, "Alex Rades" <[EMAIL PROTECTED]> wrote: > Hi, > if we have a model like: > > class News(models.Model): > title = models.CharField(..) > content = models.TextField(...) > > Imagine i want to work with different language (this means adding > multilingual content via admin and retrieving it from views/templates) > What is the best way to develop this kind of multi language support? > (Of course I dont want to add title_en title_es... ) > > Thank you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Best practice to build a multilingual site
I was using i18ndynamic (http://djangoplugables.com/projects/ i18ndynamic/) for a website, on our new project I prefered not to use afraid of performance issues. We are going to achieve something like Cortland said, but we're still analyzing the possibilities. The main issue is an easy to use admin interface, and if you have image fields, how will be their behavior, one image per language, one image in general. So you really have to think what's the best approach for your project, consider taking a look into current implementations to have an idea, there's about three different approaches for that in djangoplugables.com . Cheers, Anderson On Oct 13, 4:20 pm, Cortland Klein <[EMAIL PROTECTED]> wrote: > It depends on if a particular News is shared across languages, or if > each language has its own news. > > For me, one of my projects has translations of objects where each > object should have all translations. Thus, I have something like a > News and then NewsTranslations with ForeignKey back to News. Then I > just do News.objects.filter(newstranslations__lang=lang) or whatever. > > In admin I'd then have NewsAdmin inline a NewsTranslationsInline or > something. > > On Oct 13, 2008, at 8:48 AM, Alex Rades wrote: > > > Hi, > > if we have a model like: > > > class News(models.Model): > > title = models.CharField(..) > > content = models.TextField(...) > > > Imagine i want to work with different language (this means adding > > multilingual content via admin and retrieving it from views/templates) > > What is the best way to develop this kind of multi language support? > > (Of course I dont want to add title_en title_es... ) > > > Thank you > > -- > Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791http://pixelcort.com/ > 2260 California Street #13 > Mountain View, CA, USA 94040 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Best practice to build a multilingual site
It depends on if a particular News is shared across languages, or if each language has its own news. For me, one of my projects has translations of objects where each object should have all translations. Thus, I have something like a News and then NewsTranslations with ForeignKey back to News. Then I just do News.objects.filter(newstranslations__lang=lang) or whatever. In admin I'd then have NewsAdmin inline a NewsTranslationsInline or something. On Oct 13, 2008, at 8:48 AM, Alex Rades wrote: > Hi, > if we have a model like: > > class News(models.Model): >title = models.CharField(..) >content = models.TextField(...) > > Imagine i want to work with different language (this means adding > multilingual content via admin and retrieving it from views/templates) > What is the best way to develop this kind of multi language support? > (Of course I dont want to add title_en title_es... ) > > Thank you -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 http://pixelcort.com/ 2260 California Street #13 Mountain View, CA, USA 94040 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Best practice to build a multilingual site
I'd add a "lang" field to News and retrieve news based on whether the URL starts with /en/, /sp/ ,/ru/ etc. Erik On 13.10.2008, at 18:48, Alex Rades wrote: > > Hi, > if we have a model like: > > class News(models.Model): >title = models.CharField(..) >content = models.TextField(...) > > Imagine i want to work with different language (this means adding > multilingual content via admin and retrieving it from views/templates) > What is the best way to develop this kind of multi language support? > (Of course I dont want to add title_en title_es... ) > > Thank you > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Best practice to build a multilingual site
Hi, if we have a model like: class News(models.Model): title = models.CharField(..) content = models.TextField(...) Imagine i want to work with different language (this means adding multilingual content via admin and retrieving it from views/templates) What is the best way to develop this kind of multi language support? (Of course I dont want to add title_en title_es... ) Thank you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---