locked
Change Regional Settings to pt-BR RRS feed

  • Question

  • Hello

    I have publish an App to Azure App Service, and regional settings are in "us". Is it possible to change to "pt-BR"?

    I'm using .net core 2.2 app and i also included in th web.config the following:

      <system.web>
        <globalization culture="pt-BR" uiCulture="pt-BR" enableClientBasedCulture="false" />
      </system.web>

    Sunday, October 6, 2019 8:29 PM

All replies

  • You could try this way, you have an extra characters ‘ uiCulture="pt-BR in the property 'uiCulture':

    <configuration>

       <system.web>   

           <globalization culture="pt-BR" uiCulture="pt" />

       </system.web>

    </configuration>

    The Culture value determines the results of culture-dependent functions, such as the date, number, and currency formatting, and so on. The UICulture value determines which resources are loaded for the page.

    ASP.NET has some native support for automatic locale switching via the web.config section. If your requirement fits then the following setting can be made in web.config: For automatic localization based on the browser’s language. This tries to switch to client locale else switches to en-us.  

    <configuration>

       <system.web>   

           <globalization culture="auto:en-US" uiCulture="auto:en-US" />

       </system.web>

    </configuration>

    Refer this document for more details - Globalization and localization in ASP.NET Core. As a side note, When the EnableClientBasedCulture property is enabled, the Culture and UICulture properties are based on the AcceptLanguage header field value that is sent by the client browser. If the AcceptLanguage header value cannot be mapped to a specific culture, the Culture and UICulture values are used. The default value is false.

    Additionally, you may wish to know – By default on Azure App Service, the time zone is always UTC, but you can change it.  You need to set WEBSITE_TIME_ZONE variable in Application settings > under App settings, add this setting:

    • Key = WEBSITE_TIME_ZONE
    • Value = The time zone you want
    Monday, October 7, 2019 10:31 AM
    Owner