|[Overview][Classes][Procedures and functions][Index]
|Reference for unit 'LCLTranslator' (#lcl)
Performs string translation in the Lazarus IDE and LCL.
Maintains a global list of Lazarus resources, and provides methods and types used to stream components.
Implements Forms which are the basis for the LCL Graphical User Interface.
Provides compatibility with the Delphi Windows unit.
lcltranslator.pas contains classes and routines used to perform translation for strings used in Lazarus IDE and LCL (Lazarus Component Library). It searches for .po (Portable Object) and/or .mo (Machine Object) files used to perform I18n internationalization and L10n localization. The .po/.mo files are stored in the languages or locale directories. To access translation files from an alternate location, use the LResources unit and the LRSMoFile variable directly.
To enable string translation, use this unit in your application and check the Enable i18n option in the Project > Project Options > i18n screen. You will need to call the SetDefaultLang routine in your code to activate the translation facility. If you want translation to be performed automatically, use the DefaultTranslator unit instead.
This unit also translates LCL string constants in the lclstrconsts file using files in the directory where program translation files are stored.
For more information, see the Lazarus Wiki article:
Creating Multi-Language Applications
lcltranslator.pas is part of the Lazarus Component Library (LCL).
|Lazarus Component Library (LCL)
|Version 3.99-be67710266 (2024-01-30)