On Wed, 2007-07-11 at 10:06 +0100, Matt Davies wrote: > Hi Amit, Malcolm > > We're about to build a site that needs english/welsh transation. > > Does django.utils.translation.activate() translate from one Language > to another without having to have both languages as text in a > database?
Django's i18n infrastructure is based on gettext. Text is marked for translation, extracted into files and then translated as sentences (or, rarely, sentence fragments). The canonical version of the string (usually the English language version, but it need not be) it then passed into the i18n functions and they give you back to the translated versions by looking it up in the compiled message catalogs (compiled from the extracted, translated strings). All of this is documented in docs/i18n.txt (also available via the online docs, of course). At some point I'm going to rewrite i18n.txt so that your brain doesn't start leaking out your nose when you read it. The technical information in there is correct (and reasonably complete), though, so you can trust it. I just want to make it a bit more readable and split up the technical developer parts from the translator-oriented parts and from the user-visible-behaviour parts. For text in models (dynamic stuff in the database), you might want to have a look at the third-party multilingual app that I believe can help you here. Regards, Malcolm -- I intend to live forever - so far so good. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---