You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a multilingual application that needs multilingual controlled vocabulary. django-controlled-vocabulary does exactly what I need, except that I want the label and description fields of the terms to be in both Arabic and English.
A possible solution is to use django-modeltranslation to translates the fields. Is that advisable?
The text was updated successfully, but these errors were encountered:
Hi @majdal , thanks for your interest in the package!
I just had a quick look at django-modeltranslation as I wasn't aware of it and it looks relatively straightforward to support: essentially adding a translation.py in the app then (hopefully) the admin and the rest for work automatically.
I'm busy with other projects at the moment so it might take me some time to implement & test the changes. But feel free to discuss here, fork and submit a pull request if you need this soon.
The write_vocabulary_records_from_managers() function in ControlledVocabularyConfig class is where the problem lies.
Thinking of solutions: The only place when this problem would be encountered is at the beginning, when adding new languages to be translated. So maybe there should be a check if new languages were added, and act accordingly to that? Alternatively the whole write_vocabulary_records_from_managers function could be run more selectively, instead of being called every time on ready?
Once we think of a good solution, I'll update the PR.
Thanks for the great work on this package!
I am working on a multilingual application that needs multilingual controlled vocabulary.
django-controlled-vocabulary
does exactly what I need, except that I want thelabel
anddescription
fields of the terms to be in both Arabic and English.A possible solution is to use
django-modeltranslation
to translates the fields. Is that advisable?The text was updated successfully, but these errors were encountered: