Building a globalized web application RRS feed

  • Question

  • User-153567707 posted

    Hi folks

    I need to build a globalized web application, and I already have those resource files in the App_GlobalResources folder. My web application is built upon an N-tier architecture: DAL, BLL and Presentation are the layers, and we are using SQL Server 2008. We have decided that the database, BLL and DAL will always be operating using the en-US culture, but the culture in the Presentation layer can vary.

    ASP.NET works with two culture properties: Culture and UICulture. There's an article in MSDN that states that a thread's UICulture determines which resource files ASP.NET picks, and Culture determines datetime/currency formating, etc.

    So, to have a fully globalized application, I think I must set both Culture and UICulture, so that both Resources and datetime/currency formating are displayed using the same culture.

    Then I thought I would set those culture properties (both of them) in the BeginRequest event in my web application, based on the user's choice, and that everytime a method in the BLL is called, it sets the thread's Culture property to "en-US" and, just before it returns, it sets the thread's Culture back to what it was before.

    Now, is this the correct way of doing it? What kind of problems am I going to face? What should I be aware of?

    Thanks in advance

    Friday, May 28, 2010 9:18 AM


  • User-925286913 posted

    Instead of setting culture each time, you can create common methods (for Decimal, Dates etc.) that will convert values to en-US before sending to DAL. 

    This is how our globalized applications working.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 29, 2010 3:25 PM