Missing localization when FillDropDownWithEnum is used

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi

In ProductVariationInfo I noticed that the ddlDownloadActivationType is populated in a call to CommonHelper.FillDropDownWithEnum. I miss the translations of the item text?

This looks to be a generic problem, are there any plans to add localizations here?

/Objecta
13 years ago
I have been doing some more invetigations and I believe I have come up with a solution that can add the localized text to the language xml file.

I have added a new class to the NopSolutions.NopCommerce.BusinessLogic.Localization namespace, called LocalizeControls. Here I have copied the FillDropDownWithEnum method from the CommonHelper in the NopSolutions.NopCommerce.Common.Utils namespace.

I have added code in the FillDropDownWithEnum to read the localized text using the GetLocaleResourceString method, using a new extension method to the DropDown list control, called LocalizeItem. The extension method has been added to the extension.cs code.

I have replaced all the calls to the CommonHelper. FillDropDownWithEnum with a new call to LocalizeControls. FillDropDownWithEnum. All the Enumerations used with the related calls has been added to the language xml file, so they can be translated.

How and where can I submit my changes to the code?

Objecta
13 years ago
Open up a dropbox account, upload your zip file, add a link here.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.