Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1019717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:03:27+00:00 2026-05-16T11:03:27+00:00

In my current application I want to implement ASP.Net localization with global resources. I

  • 0

In my current application I want to implement ASP.Net localization with global resources. I have the problem, that after changing the CurrentThread.CurrentUICulture and CurrentThread.CurrentCulture and changing to another page, these values are overwritten by the browser default values.

I have a DropDownList that enables a selection between different languages. In the ItemChanged Event I store the culturename in the session, redirect to my defaultpage and use this code

protected override void InitializeCulture()
{
    System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
    System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
    base.InitializeCulture();
}

After switching to another contentpage, that does not override InitializeCulture I’m back to the default browser language. How can I make that persistent?

What options do I have? The following come to my mind:

  • On every *.aspx page I do implement InitializeCulture
  • I create a new class that derives from System.Web.UI.Page and overrides the InitializeCulture Eventhandler. Every *.aspx page I use derives from it.

Isn’t there a more “built-in” way? ASP.net offers such good localization support, so I guess there must be an easier/more efficient way to achieve my goal. Which one is there?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:03:27+00:00Added an answer on May 16, 2026 at 11:03 am

    You need to re-set the culture in your base page’s InitializeCulture method as you have described. This should be done upon each request. The CurrentCulture value is set based on the Accept-Languages header sent by the browser, and will always be set this way for each new request. There’s no option but to set it manually afterwards for each new request, and Page.InitializeCulture is a good place to do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my current application I have a form that requires the user to enter
I came across a problem in my current application that required fiddling with the
I have a pretty standard table set-up in a current application using the .NET
I want to return all application dates for the current month and for the
We have a current application where user login credentials are stored in a SQL
so I'm using LinQ2SQL quite heavily in my current application, and although I have
My current application has a JFrame with about 15 actions stored as fields within
Using the method Application.Restart() in C# should restart the current application: but it seems
Is it possible to fetch the current application version programmatically for use in urls
I need to know how I can detect the current application pool I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.