Connecting Culture Specific Database based on CultureInfo

Posts   
 
    
prabhu
User
Posts: 77
Joined: 20-Dec-2006
# Posted on: 09-May-2007 11:58:11   

Hi,

We are developing a 3 Tier CRM kind of web application for the sales force of our company that supports multiple languages.

Using the following Softwares

UI - ASP.NET 2.0, Telerik ASP.NET UI Components DAL - LLBLGEN Pro 2.0 BL - C# DB - sqlServer2005

Developed all the BL Componets as an services(Stateless - following Adapter model in DAL LAyer). User will select the language based on dropdown in a master page. Following Explicit localization strategy.

Designed databases in such a way that each country is having different databases. All the master related data will be stored in a respective schema resource table as an xml with default and respective culture data's. For location related tables it will be stored in LocationResource table.

<MLString><translation lang="en-US" value="Vacancy" /><translation lang="zh-CN" value="??" /></MLString>

When the user selects a language i need to pass the culture to the BL. After receiving the culture info i will determine the catalogname to use. Then i will pass the same as an constructor to the DataAccessAdapter class to retrieve the data from respective database.

Since the services will be located in different tier or machine i can't share the culture info in a session or cache to be passed to BL. The req is that we should not pass it as an parameter to any of the BL Methods.

Please let me know how can i pass the culture info from the UI layer to the datafacade layer so that i can select the culture specific DB.

Help is very much appreciated.

Regards

Prabhu

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 09-May-2007 18:20:03   

I'd have suggested to store the cultureInfo of every logged in user in a hashtable in the BL Service. But since you want it to be stateless, it shouldn't hold that kind of information and you will need to pass as a parameter when calling each method of the BL.

I can see no other way but storing it in the session of the WebApplication, so it can be used in the BL calls.

prabhu
User
Posts: 77
Joined: 20-Dec-2006
# Posted on: 10-May-2007 03:26:55   

The service we are using here is using wcf framework. Shall i pass the culture information through SOAP headers in messages.

jbb avatar
jbb
User
Posts: 267
Joined: 29-Nov-2005
# Posted on: 15-May-2007 15:42:36   

Hello,

if you pass the culture information through the SOAP Header, you will need to modify your webservice to read the information on the header So isn't it better to have it as a param of your function to be sure that the culture information is given as a mandatory parameter?