Closed Pomax closed 6 years ago
Hi @Pomax,
I'm not sure I fully understand what you want to do, perhaps due to my lack of experience on Transifex. Django supports strings translation out of the box relying on gettext, see https://docs.djangoproject.com/en/2.0/topics/i18n/translation/
django-modeltranslation
and, consequently, wagtail-modeltranslation
, allow the translation of dynamic content living on the database.
On a Django Project with Wagtail and wagtail-modeltranslation
you would use the default gettext support for static content translation and wagtail-modeltranslation
for the CMS content.
Essentially "how do I combine this with a key=value file". Transifex (and other community driven translation solutions) lets you use keys of your choosing in your templates (e.g. "MainWelcomeMsg", "PrincipalID", "SignupLinkLabel", etc. etc.) with a template function that makes it resolve to the correct language.
Working on a website for the mozilla foundation, while the base content in English is written by staff and authorized contributors, that content then gets translated to some 100 languages by a volunteer community, none of which will have access to the CMS itself, so being able to call something that takes the list of known translations and then populates any field in any page that hasn't been filled in, would be useful.
I'm not sure how feasible that is of course, it could just be too different from how this library operates.
There may be some other translation plugin for Wagtail/Django that can do that but not wagtail-modeltranslation
. The point of wagtail-modeltranslation
is to handle translations within the database not through key-value.
Note that, nothing stops you from using translation keys in your templates for static content, that's handled by Django natively: https://docs.djangoproject.com/en/2.0/topics/i18n/translation/#internationalization-in-template-code
Since what you're asking falls outside the purview of wagtail-modeltranslation
I'm marking this issue as closed. Please reopen if you don't agree.
Is there a way to combine this library's approach with translated strings that come from Transifex or the like? (e.g. wagtail itself is translated that way)