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
If MODELTRANSLATION_LANGUAGES is set, it must be used instead of LANGUAGES.
I found it in the translated_slugs function but looks like this issue is global.
For example, I have a website with 5 languages of admin interface (they are set in LANGUAGES) but only 3 languages are used in content (they are set in MODELTRANSLATION_LANGUAGES).
Following the django-modeltranslation package, the best way is:
This list of languages must be used in all places where the list of languages for translated fields is used.
I see it's implemented in AVAILABLE_LANGUAGES of the modeltranslation.settings, so it just can be used.
The text was updated successfully, but these errors were encountered:
AVAILABLE_LANGUAGES = list(
getattr(
settings,
"MODELTRANSLATION_LANGUAGES",
(val for val, label in settings.LANGUAGES),
)
)
If MODELTRANSLATION_LANGUAGES is not defined, it will use the list of LANGUAGES. So, we should replace LANGUAGES for AVAILABLE_LANGUAGES, do you agree?
If
MODELTRANSLATION_LANGUAGES
is set, it must be used instead ofLANGUAGES
.I found it in the
translated_slugs
function but looks like this issue is global.For example, I have a website with 5 languages of admin interface (they are set in
LANGUAGES
) but only 3 languages are used in content (they are set inMODELTRANSLATION_LANGUAGES
).Following the
django-modeltranslation
package, the best way is:This list of languages must be used in all places where the list of languages for translated fields is used.
I see it's implemented in
AVAILABLE_LANGUAGES
of themodeltranslation.settings
, so it just can be used.The text was updated successfully, but these errors were encountered: