List all pages on this site [Alt+M] For Developers...   List all pages on this site 
About this site 
Go to first topic
Go to Bottom of this page

Reload this page Locales and Cultures

Next: Internationalization  Next Topic

  Email me!  How I may help  Your Shopping Cart

A culture consists of a language in lower case and a country in upper case.

A locale consists of the culture code plus a variant code.

Reminder To separate these two, Microsoft/ASP uses dashes and Java/UNIX uses underlines.


   webpage article MS ASP.NET Internationalization
A website external to this site Articles on Internationalization of ASP pages
A website external to this site Microsoft's Global Development and Computing Portal

ASP.NET accesses locales through its CultureInfo class, which tracks two properties: CurrentCulture for the default of locale-dependent functions and CurrentUICulture for locale-specific lookup of resource data. These can be specified for each thread and request:

<%@Import Namespace="System.Globalization"%>
<%=DateTime.Now.ToString("f", new System.Globalization.CultureInfo("de-DE"))%>

Java Internationalization

Internally, most Java packages make use of the 1.4.2/ 1.5 java.util.Locale package that encapsulate locale information in Locale objects. To instantiate a Locale object with the default Locale obtained from the operating system:

import java.util.Locale.*;
private Locale locale = new java.util.Locale.getDefault();

Internally, the Locale id for English in the United States is “en_US”.

To set the default locale, the country and variant are optional but the language is required: Reminder

java.util.Locale.setDefault( localevar );

Next: Internationalization  Next Topic

How I may help

Send a message with your email client program

Your rating of this page:
Low High

Your first name:

Your family name:

Your location (city, country):

Your Email address:

  Top of Page Go to top of page

Thank you!