Table of Contents

TLocale Class

Implements ILocale by parsing a locale name string into its language, script, and region components.

Remarks

Parses locale strings in BCP 47 format (e.g., "en-US", "zh-Hans-CN"). Supports both hyphen and underscore separators.

Syntax

Unit: Bcl.Lang

TLocale = class(TInterfacedObject, ILocale);

Constructors

Name Description
Create Creates a locale by parsing the specified locale name string.

Properties

Name Description
OriginalName Gets the original locale name string as provided during creation.
Name Gets the normalized locale name composed from language, script, and region.
Language Gets the ISO 639 language code.
Region Gets the ISO 3166 region code.
Script Gets the ISO 15924 script code.