Table of Contents

TLocalizer Class

Manages global and per-thread text localizers for retrieving translated strings.

Remarks

Provides access to the current localizer through Current, which returns the thread-specific localizer if set, otherwise falls back to the global localizer.

Syntax

Unit: Bcl.Lang

TLocalizer = class(TObject);

Methods

Name Description
Global Returns the global text localizer.
CurrentThread Returns the text localizer for the current thread.
Current Returns the active text localizer, preferring the thread-specific localizer over the global one.
FindLocalizer Finds and returns a text localizer for the specified locale name.
SetGlobalLanguage Sets the global language to the specified locale.
SetCurrentThread​Language Sets the current thread language to the specified locale.
FinalizeCurrent​Thread​Language Clears the current thread language, reverting to the global localizer.