Appropriate manner to load data for country RRS feed

  • Question

  • User-1526035670 posted
    I'm saving the country and language code in a database. I'm also creating global resources files to save static fields for all countries.

    When the site loads how do I determine which country and language I need to load? So if the browser stores the info what would be the appropriate method to determine I lost the correct data?
    Tuesday, March 3, 2020 7:36 PM

All replies

  • User475983607 posted

    This is explained in your previous thread.


    Tuesday, March 3, 2020 9:07 PM
  • User-1526035670 posted

    I just saw one of your replies with the below

    "I'm not sure what you mean by "single country". If you are using standard localization and globalization, the browser sends the user's configured culture (when the use setup their machine) on each request. The framework reads the culture value and uses the culture in the current context. This happens on each and every request and what drives the loading the resources files."

    I must've missed that. So I could use HttpContext, considering I'm storing the country with multiple languages as in

    En-gb for UK
    En-Us for USA
    Fr-Ca for Canada French
    En-Ca for Canada English

    This would mean if I referred to your link and my user is in Canada, the context would clarify which version of Canada language it would select purely based on the users system setting. Is this correct?

    Tuesday, March 3, 2020 9:41 PM