Litium accelerator field template localization for product templates

For anyone maintaining their field templates via code and like to have the translations in the resx-files there is an issue in the accelerator with translations for fieldgroup for product module. This is due to that the code assumes that fields groups are in property FieldGroups witch inte not the case for product module.

Just in case some one have the same issue. you need to localize both ProductFieldGroups and VariantFieldGroups for product fieldtemplates

if (item is ProductFieldTemplate template)
                        {
                            _fieldFrameworkSetupLocalizationService.Localize(item, template.ProductFieldGroups as ICollection<FieldTemplateFieldGroup>);
                            _fieldFrameworkSetupLocalizationService.Localize(item, template.VariantFieldGroups as ICollection<FieldTemplateFieldGroup>);
                        }
                        else
                        {
                            _fieldFrameworkSetupLocalizationService.Localize(item, ((dynamic)item).FieldGroups as ICollection<FieldTemplateFieldGroup>);
                        }

Litium version: 7.4.2

Created bug 53745 about this.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.