Change text for different languages

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 anni tempo fa
Hi. I try to change checkmoneyorderpaymentsettings.descriptiontext value but it changes the text to all languages. Is there a way, I can have different text for different languages on this specific setting name? Thank, you.
6 anni tempo fa
tymas02 wrote:
Hi. I try to change checkmoneyorderpaymentsettings.descriptiontext value but it changes the text to all languages. Is there a way, I can have different text for different languages on this specific setting name? Thank, you.


No there is no setting for this.

for this you need to customize code.
6 anni tempo fa
tymas02 wrote:
Hi. I try to change checkmoneyorderpaymentsettings.descriptiontext value but it changes the text to all languages. Is there a way, I can have different text for different languages on this specific setting name? Thank, you.


I think you can.
Its resource name is plugins.payment.checkmoneyorder.descriptiontext

Also, following code supported for localization (in the PaymentCheckMoneyOrderController class)

var model = new ConfigurationModel();
            model.DescriptionText = checkMoneyOrderPaymentSettings.DescriptionText;
            //locales
            AddLocales(_languageService, model.Locales, (locale, languageId) =>
            {
                locale.DescriptionText = checkMoneyOrderPaymentSettings.GetLocalizedSetting(x => x.DescriptionText, languageId, 0, false, false);
            });


P/S: I checked with nopCommerce 3.90 source code

Hope that help :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.