Today I've released a new version of TransDb, the Django package that allows storing text at database in more than one language (using the same field).
New version is pretty much easier to use, after fixing many bugs, and avoiding the use of a filter in templates.
Now, migrating your single-language application to a multi-language one is very easy, so almost the only thing you've to do is changing your model fields (no data transformation is required, it is done automatically when you translate texts at admin). A full migration procedure is available at project page.
You can find everything at Google's project page.
Looks good! Maybe you should try to get this in the real Django source-code?
ReplyDeleteI think that to store serialized python dictionary with translations in a bad idea.
ReplyDeleteThe `django-multilingual` way is much better and transparent for client code.
Well done! But, why persisting i18n in db and not in a file as usual? What's the performance impact of this?
ReplyDeleteCheers
Alex, the Python dictionary option shouldn't be a good idea, but with it I reduce my code in 90%, I can allow searches in admin, model syntax is pretty much clearer, and more advantatges, so I think that is better than creating a table for every multilingual field.
ReplyDeleteBosco, db i18n isn't an alternative to file one. It's just that when you have to make translatable some synamic information, you can't do it with the django official way.
ReplyDeleteThink on a multilingual product table, for example.