RickStrahl / Westwind.Globalization

Database driven resource localization for .NET applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Localizing User Data using Westwind Globalization

ralph1996 opened this issue · comments

This is more of a question than an issue. We have been using Westwind for the globalization of our UI for a number of years now and it works great. We now are looking to be able to include localization of user data. We have clients that operate in multiple countries and need things like item descriptions available in the different languages. The issue is that they can have tens of thousands of items and my concern is that adding these to the library and pulling the resources using DbRes.T will have issues with performance and memory usage.

What I am unclear on is when a resource is loaded on the server side. It sounds like all the resources for a locale and/or resource set may be loaded at once which means that we could be loading all of the thousands of item descriptions each time we load the page. This could be slow as well as it could also consume large amounts of memory. The reason I am asking this is because I noticed in the documentation for dbRes that this statement was made: "Data access occurs only on initial access of each resource set/locale.". This makes me think they are all loaded at once when you request any single resource within the resource set / Locale combination

If this is the case I guess one way would be to assign each "item" to its own ResourceSet. Then loading would load only that value. But this may cause numerous hits to the database and also affect performance.

I am curious if you have suggestions/opinions regarding the suitability of the library for this purpose. We can of course roll our own data storage for the translations, but before digging into that I wanted to see if there was any way we could leverage Westwind first.

If my understand is incorrect and we can load resources individually is there also a way to load the resources for multiple resourceIds at the same time? Effectively a query of multiple specific resources.

Thanks for any help. Even if we cannot make use of the library for this it is a great tool.

Yes. I am into the same situation where I need to localize dynamic Data, I am cosidering entity level translation table (language neutral info will be in main table and its translation table will have language specific info) for each table/entity. and implement onload/Lazy cache kind of approach at application level . I used WestWind for static data(labels & error messages) and it helped me in great extent . I am also looking if there is any better solution with WestWind tool for my requirement.