Globalization - set culture

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

Set culture on application level

<globalization
requestEncoding="utf8"
responseEncoding="utf8"
culture="cs-CZ"
uiCulture="cs-CZ"
/>

Set culture on web page level

In page directive.

<%@ Page UICulture="es" Culture="es-MX" %>

In code behind.

        Thread.CurrentThread.CurrentCulture = 
            CultureInfo.CreateSpecificCulture("cs-CZ");
        Thread.CurrentThread.CurrentUICulture = new 
            CultureInfo("cs-CZ");

Resources

programming/net/setculture.txt · Last modified: 2018-06-21 19:48 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0