ChangeCulture Method


ChangeCulture Method

Location

My.Application.ChangeCulture

Syntax

     My.Application.ChangeCulture(cultureName) 


cultureName (required; String)

The name of the culture to use. This parameter includes a two-letter lowercase language code, optionally followed by a hyphen and a two-letter uppercase country or region code. These codes are defined as ISO standards. For instance, the culture for the English language with no specified region is "en," while English in the United States is defined as "en-US." Setting this parameter to the empty string ("") indicates the default "invariant" culture. See the System.Globalization.CultureInfo Class entry in the Visual Studio documentation for a full listing of all possible culture name values.

Description

The ChangeCulture method modifies the active culture settings used by the active thread to format and manage certain display elements. The culture setting controls the formatting of dates, times, numbers, currency values, letter casing, and the sorting and comparison of text strings. For instance, this setting controls the default order of the month, day, and year values when formatting dates. Although the culture setting includes a language code, it is not used to determine the user interface language.

Usage at a Glance

An exception is thrown if an invalid culture name is used.

Related Framework Entries

  • Microsoft.VisualBasic.ApplicationServices.ApplicationBase.ChangeCulture Method

  • System.Globalization.CultureInfo Class

  • System.Threading.Thread.CurrentCulture Property

See Also

Application Object, ChangeUICulture Method, Culture Property




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net