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 9256763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:01:41+00:00 2026-06-18T12:01:41+00:00

My understanding is that when you set CurrentThread.CurrentUICulture to for instance da-DK it will

  • 0

My understanding is that when you set CurrentThread.CurrentUICulture to for instance “da-DK” it will look for resource files in “da-DK”, then “da”, then fall back to the invariant culture. This works well for Desktop applications, because operating systems are not typically multi-lingual. For websites however this is not necessarily the case.

Let say I have a visitor whose browser insists the user wants “da_DK”, “de_DE” and “en_GB”, that is Danish if it exists, then German, then British English as a fallback.

Is there any way to accommodate this preference using the .Net 4 localization framework?

And no, this is not a thought experiment. 🙂

EDIT

Just to be clear, the problem is not getting the localization headers from the web request. The problem is setting the CurrentThread.CurrentUICulture in such a way that it will check resource files in order, rather than just checking for one.

Alternatively a way to check whether the CurrentUICulture has matching resx files.

  • 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-06-18T12:01:42+00:00Added an answer on June 18, 2026 at 12:01 pm

    I think this is what you are after :

    HttpRequest.UserLanguages()

    This returns the array of user languages in preference order. Probably a good idea to allow them to change whatever localization you apply against this information, however, in case their browser configuration does not accurately reflect what they really want.

    Update :

    To check if the resources exist use :

    ResourceManager.GetResourceSet

    Here you can set tryParents to false. The method will return null if no resources exist. You can then proceed to try the next preferred culture returned in the header.

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

Sidebar

Related Questions

My understanding is that the LinqToSql pseudolanguage describes a set using a syntax very
Old question My understanding is that C# has in some sense HashSet and set
My understanding is that using set.seed ensures reproducibility but this is not the case
It is my understanding that with a cursor that is dynamic will reflect any
I have an InputStream that is set up to handle local files, but want
It is my understanding that, in addition to allocating memory, alloc sets all instance
My understanding is that when I set SL5 to run OOB and elevated trust
For breadcrumbs to work in twitter bootstrap, my understanding is that you just set
I'm looking to write a script that will take a bunch of .js files,
Very frustrating experience understanding UIGraphicsPushContext(context) and UIGraphicsPopContext() My understanding is that I can set

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.