Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

136
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda