MatchLocale Method
Finds the best matching locale from a list of candidates for the requested locale.
Remarks
Uses a scoring algorithm that considers language, region, and script. Includes special handling for Chinese script variants.
Syntax
Unit: Bcl.Lang
function MatchLocale(const Requested: ILocale; const Candidates: ): ILocale;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Requested | ILocale | The requested locale to match against. |
| const | Candidates | The array of available candidate locales. |
Returns
The best matching locale, or nil if no candidate matches the requested language.