Culture settings CodeSample - Setting in code
From Visual WebGui Wiki
| This article will have a few sections added to it soon, based on the following article type skeleton: NewCodeSampleTemplate |
Contents |
Overview
This samplecode shows how to set Culture in code as well as showing the difference between Visual WebGui and Windows Forms applications in setting Culture info.
VB.NET Code
Visual WebGui
System.Globalization.CultureInfo objCI = new System.Globalization.CultureInfo("En-US") objCI.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd" VWGContext.Current.CurrentUICulture = objCI
Windows Forms
System.Globalization.CultureInfo objCI = new System.Globalization.CultureInfo("En-US") objCI.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd" Thread.CurrentThread.CurrentCulture = objCI Thread.CurrentThread.CurrentUICulture = objCI
C# Code
Visual WebGui
System.Globalization.CultureInfo objCI = new System.Globalization.CultureInfo("En-US"); objCI.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"; VWGContext.Current.CurrentUICulture = objCI;
Windows Forms
System.Globalization.CultureInfo objCI = new System.Globalization.CultureInfo("En-US"); objCI.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"; Thread.CurrentThread.CurrentCulture = objCI; Thread.CurrentThread.CurrentUICulture = objCI;
