GithubHelp home page GithubHelp logo

Comments (2)

brakim avatar brakim commented on June 10, 2024

Examples of Accept-Language Header Values

  • A single language, English: Accept-Language: en
  • English preferred, but French is acceptable: Accept-Language: en, fr
  • English preferred, French as a second choice, and any other language as a less preferred option: Accept-Language: en;q=1, fr;q=0.9, *;q=0.8
  • English as used in the United States specifically, with British English as a second choice: Accept-Language: en-US, en-GB
  • Preference for Spanish from any region, but with a higher preference for Spanish specifically from Spain: Accept-Language: es-ES;q=1, es;q=0.9

I haven't found any real evidence on how the browser specifies when to use

  • Neutral culture: A culture that has a specified language, but not a region (for example "en", "es").
  • Specific culture: A culture that has a specified language and region (for example, "en-US", "en-GB", "es-CL").

But my findings seems to suggest when the browser provides a Specific culture, it also provides the neutral as a fallback.

from nopcommerce.

brakim avatar brakim commented on June 10, 2024

In the admin area when you edit a Language, inside the view NopCommerce have this piece of code
var cultures = System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.SpecificCultures)

maybe it should be

var cultures = System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.NeutralCultures)

i have never encountered the need to have two languages for example English (en-GB) and English (en-US).
I don't say there isn't cases when this feature is needed, but it seemes like edge cases to me.

from nopcommerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.