Table of Contents

TTMSFNCLocalizationLocalizer Class

Component that switches the active application language at runtime, loads and saves translation files, and notifies subscribers when the active language changes.

API unit family: TMS.TMSFNCLocalizationLocalizer Inherits from: TComponent Implements: ITMSFNCProductInfo

Syntax

TTMSFNCLocalizationLocalizer = class(TComponent, ITMSFNCProductInfo)

Properties

Name Description
AcceptedStatuses Which translation statuses are applied to the application.
LocalizationFiles List of translation files that make up the translation data set.
LocalizationFolder Folder that is scanned for translation files.
LocalizationStartMode Determines when the active language is applied to the application.
PersistLanguageSelection Determines whether the last selected language is remembered between application runs.
Version Version number of the localization component.

Methods

Name Description
LoadFromFile Loads translations from the specified file, replacing the current translation data.
LoadFromStream Loads translations from the specified stream, replacing the current translation data.
PerformLocalization Applies the current language to the application, translating all open forms and data modules.
SaveToFile Saves the current translations to the specified file.
SaveToStream Saves the current translations to the specified stream.
TrySetLocale Activates the language for the given locale.

Events

Name Description
OnLanguageChange Occurs after the active language has changed.

Used by