Payment plugin multilanguage

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

i'm writing a new version for the OmniKassa payment plugin.
I want to make it multilanguage.
In nop 2.50 is possible to make the configuration labels multilingual (changeset 78a26e0bf748).
Is also possible to make the contents of the fields (like Description) multilanguage? Like the shipping plugins?
11 years ago
What description field? Plugins have "Friendly name", but they don't have "Description"
11 years ago
Hi Andrei,

i added a Description in the plugin config. This field is used to show some text in the paymentinfo.
I would like to make the text displayed multilingual.
11 years ago
Sure. You can do it the following way:
1. Add an appropriate UI for managing localizable description fields
2.  Store their values as [LocaleStringResource] (similar to "Friendly name" field of plugins)
11 years ago
Tnx for the quick reply.
If i understand good i have to put also the text description in an localstringresource, such as with the labels.
This means a user has to change the appropriate text in the language menu settings instead of in the plugin configuration?
11 years ago
olandese wrote:
If i understand good i have to put also the text description in an localstringresource, such as with the labels.

Right. Put it in localstringresource

olandese wrote:
This means a user has to change the appropriate text in the language menu settings instead of in the plugin configuration?

No. Please see my post above (step 1). And if you add an appropriate UI for managing locales on your plguin configuration page (one tab for each language), then a store owner would be able to manage it without going to the locale string resources page. See how it's done for "friendly name" of plugins (in the upcoming version 2.60)
11 years ago
Hi Andrei,

i have looked in the code and i understand how it works, thanks!
Just one question, why is the PaymentMethodModel class not inheriting from the ILocalizedModel<T>, like the ShippingMethodModel class?
11 years ago
Because shipping methods are stored into database (like products and 99% of all other entities in nopCommerce). And payment methods are a bit different. They are entities, they're plugins.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.