Cultures and Regions
As an example, the ASP.NET page that is pulled up in an end user's browser runs under a specific culture and region setting. When building an ASP.NET application or page, the defined culture in which it runs is dependent upon a culture and region setting specified either in the server in which the application is run or in a setting applied by the client (the end user). By default, ASP.NET runs under a culture setting defined by the server. Stated simply, unless you specifically look for a client's requested culture, your application will run based on the server's culture settings.
The world is made up of a multitude of cultures, each of which has a language and a set of defined ways in which it views and consumes numbers, uses currencies, sorts alphabetically, and so on. The .NET Framework defines languages and regions using the Request for Comments 1766 standard definition (tags for identification of languages—www.ietf.org/rfc/rfc1766.txt), which specifies a language and region using two-letter codes separated by a dash. The following table provides examples of some culture definitions:
Culture Code | Description |
en-US | English language; United States |
en-GB | English language; United Kingdom (Great Britain) |
en-AU | English language; Australia |
en-CA | English language; Canada |
fr-CA | French language; Canada |
The examples in this table define five distinct cultures. These five cultures have some similarities and some differences. Four of the cultures speak the ...
Get Professional Visual Basic 2012 and .NET 4.5 Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.