Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda