Showing posts with label Localization. Show all posts
Showing posts with label Localization. Show all posts

Wednesday, July 6, 2011

CurrentUICulture Property

Gets or sets the current culture used by the Resource Manager to look up culture-specific resources at run time.

// Set the user interface to display in the
// same culture as that set in Control Panel.
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;


CurrentCulture Property:

Gets or sets the culture for the current thread.

' Set the user interface to display in the
' same culture as that set in Control Panel.

Saturday, July 2, 2011

Localization of Dates in C#

To store current date as UTC in sql server, sql GETUTCDATE() function can be used( in your storedproc).
Note that GETUTCDATE() returns the current datetime in UTC.
In your codebehind you can use the C# ToLocalTime function method to restore a local date and time value that was converted to UTC
example:
DateTime date1 = new DateTime(2011, 4, 13, 2, 30, 0, DateTimeKind.Local);
DateTime utcDate1 = date1.ToUniversalTime();
DateTime date2 = utcDate1.ToLocalTime();

How to upload app to macOS

1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...