Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
Identifying a default specific CultureInfo from a generic one

I'm writing a localization resource manager. Sometimes I'm given a culture-specific set of resources (like it-IT, or nl-NL), but I have not a set for the associated generic culture (it).

What I'm doing is that I'm using the specific culture even in case the client (usually a browser) is requesting a generic culture (i.e. if the client asks for it I'm going to serve it the it-IT resources).

Now, I'm trying to understand what could be the strategy to handle a case in which I have multiple specific cultures for the same generic one:

  • nl-NL
  • nl-BE

I'm given both, but I have no set for nl. So, what should I return to clients asking for nl? If I had to manually pick a culture, I would pick nl-NL, and this would be the same for other common cases like fr-FR and de-DE, but I wonder if there could be an heuristic to handle more cases other than "the language part is equal to the country part" (which is the dumb "rule" I'm stuck with at the moment).

Now, I know this is a hard problem in the general case, and I'm not trying to solve "the general case". I want to understand if there is some way to resolve a "DefaultSpecific" culture from a generic CultureInfo instance.

In a very naive and imprecise way, I would like something like the functional opposite of the CultureInfo.Parent property.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!