Ticket #8907 (closed Bug: fixed)
Archetypes ignores the language tool's use_combined_language_codes setting
|Reported by:||davisagli||Owned by:|
Description (last modified by davisagli) (diff)
Archetypes builds its vocab for the 'language' field (in ExtensibleMetadata.py) by getting a IMetadataLanguageAvailability utility and calling its getLanguageListing method. (The standard implementation of this utility is in plone.i18n.locales.languages.) getLanguageListing takes an optional 'combined' parameter which determines if country-specific language variants should be included. In Plone we want to pass that parameter based on the use_combined_language_codes attribute of the portal_languages tool, but that's not happening. Do you have any thoughts on the best way to fix this without tying Archetypes to the PloneLanguageTool?
This becomes a particular problem when the use_combined_language_codes is True, and some country variants of languages have been selected in the language configlet. Then when you try to make a new translation into one of those languages using LinguaPlone, the new language does not appear in the Archetypes-generated language field selectbox, so the browser defaults the field to language neutral (empty string) and when the new translation gets submitted its association with the original item gets clobbered, and the new translation thinks it's canonical.