-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
Right now LocalizedValue falls back to the primary language if no translation for the current language is present. I think it's interesting if the user could specify a fallback chain. This could be in a per-missing-language fashion:
LOCALIZED_FIELDS_FALLBACKS = {
'en': ['es', 'eu'],
'es': ['eu', 'en'],
'eu': ['es', 'en'],
}
For backwards compatibility, LOCALIZED_FIELDS_FALLBACKS.get(lang, [PRIMARY_LANGUAGE]).
Alternatively, the setting could be a function that is given the missing language and field info.
This could be a global setting or a field parameter.
Metadata
Metadata
Assignees
Labels
No labels