Hi!

Is there a way to store translation strings (that are used by, for
example, ugettext_lazy) in the database as opposed to some file? I
know about the translation apps listed on
http://www.muhuk.com/2010/01/dynamic-translation-apps-for-django/ and
I am thinking not about translating stuff in model classes, but
for example validation errors, etc.

Basically I am wondering whether it is possible to use a db-based
backend as opposed to the filesystem-based backend described in
http://docs.djangoproject.com/en/1.2/topics/i18n/deployment/#how-django-discovers-translations
(where only files and directories as mentioned as places where django
looks for translations).

The idea is that I need to make all texts translatable on a web ui,
including validation errors. One possibility is to use one of the many
multilingual apps and override each validation error with a string
translated by this mechanism, but I figured it would be simpler and
more robust if I could simply have a web ui to edit the translation
strings used by django's i18n framework.

Judging by the fact that none of the translation apps appear to work
this way, ie. they all appear to reinvent the wheel in some sense, and
have a parallel translation mechanism, I wonder whether there is some
fundamental reason why nobody did it this way. After all, .po
etc. files are just a database for looking up strings, so why not
stuff it in the SQL database along with the other data?

(An obvious possibility is to store the strings in the db, and
periodically generate the .po etc. files from there, since presumably
the strings are usually pretty static and updating them in such a
batch manner would be acceptable. Is that the best I can do?)

Thanks in advance,
Daniel Abel

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to