Reputation: 329
a bit of background, I have a working project written in Django which is something like internet shop with a blog.
For now, my customer needs an ability to add translations and new languages on the fly. The model related part can be easily done using one of many libraries (like django-modeltranslation
, django-parler
...).
The problem is with translatable strings and formatting. Updating translatable strings can be somehow covered by django-rosseta
(works with .po
, compiles them and reloads the server, but is it ok?). And how to handle adding new language without touching source code (settings.LANGUAGES
section)?
Ideally, all localization-related data should be stored in the database with some kind of caching.
Any ideas?
Upvotes: 1
Views: 506
Reputation: 329
After a week of research, developed a working demo, maybe it will be useful for someone.
Basic idea: store all translations in a database and rebuild localized .mo
files if necessary.
Upvotes: 1