System.SysUtils.TFormatSettings.Create

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

class function Create: TFormatSettings; overload; static; inline;
class function Create(Locale: TLocaleID): TFormatSettings; overload; platform; static;
class function Create(const LocaleName: string): TFormatSettings; overload; static;

C++

static TFormatSettings __fastcall Create()/* overload */;
static TFormatSettings __fastcall Create(unsigned Locale)/* overload */;
static TFormatSettings __fastcall Create(const System::UnicodeString LocaleName)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils TFormatSettings

Description

Call Create to initialize an instance of the TFormatSettings class.

A TFormatSettings record must be initialized before use. Call Create to populate all fields according to the specified locale.

There are 3 Create overloads, which are described in the following table:



Parameter Type Description

none

-

Initializes a TFormatSettings record with current default values provided by the operating system.

Locale

TLocaleID

Initializes a TFormatSettings record with values provided by the operating system for the specified locale. The locale is an LCID on Windows platforms, or a locale_t on Unix platforms.

LocaleName

string

Initializes a TFormatSettings record with values provided by the operating system for the specified locale name in the "Language-Country" format. For example:

  • 'en-US' for U.S. English settings
  • 'en-GB' for Great Britain English settings



Note: On Windows, use the GetThreadLocale API routine to obtain the LCID value of the current thread.