Extend nopcommerce by multilingual entities? Which pattern to use? Performance tips?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 年 前
Dear nop commerce team,

I'm working on an online shop, where I need an extended version of nop commerce. Currently I'm working with nop 2.20.

I'm building in some new entities which I need for my purposes. This new entities have multilingual properties, i.e. a title property which should be displayed in the language of the current user.

Based on my own programming experience, I would start here the following pattern:

Entity( Id, DefaultTitle )
Entity_ML( EntityId, LanguageId, Title)

So I could load the entity and its multilingual data with one database query and so minimizing db load.

Now I see, you are using an different aproach for this. If I remember right, you load the entites and its multilingual data with separate queries. I do not want critizise anything. I'm just curious. Don't you excepct an increased db load with this approach? Or do you have any other methods for minimizing it? Maybe some sort of caching?

At the moment, am just looking for some information regarding this topic because I have to make a decission:
Keeping my pattern with Entity - Entity_ML or using your pattern. What would be your suggestion regarding this?

In the sources, I found also this classes: LocalizationExtentions, ILocalizedEntity

Could I use they for my multilingual entities?

Kind regards,
kob
12 年 前
Our current approach allows very easy localization of ANY entity. And it allows to have default values (when localized ones are not entered)

Regarding performance optimization. Only one request per localizable property will be done in upcoming version 2.30 (cached between requests). See changeset 7ba38152b37a
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.