FAQ

Advanced Localizer for RAD Studio VCL is an indispensable component suite for Delphi and C++ Builder for adding multilingual support to your applications. Using the powerful component editors of this suite you can easily and quickly localize the properties of components within each form, generate a language template file containing the current values of language-specific component properties, manage localization files, and specify which components and properties are to be localized. Applications that use Advanced Localizer for RAD Studio VCL can switch languages with one command at run-time, without reloading. Also, this suite provides the ability to write component descendants that can work with user-defined language files.

Advanced Localizer for RAD Studio VCL is a set of Delphi/C++ Builder components, so you must have Delphi/C++ Builder. Advanced Localizer for RAD Studio VCL package includes the 'readme.txt' file where you can find all information about installing the component.

You can localize any string in the code by the following steps:

  • Create a new section in your *.lng file and name it as you want, e.g. [Additional strings].
  • Copy all strings from resourcestring section to that new section of *.lng file.
    For example, the resourcestring section:
    resourcestring
    String1 = 'String one';
    String2 = 'String two';
    in *.lng file would be
    [Additional strings]
    String1="String one"
    String2="String two"
  • Now you can get any of that strings by the following code:
    var
    S1, S2: string;
    ...
    {Source is TQLanguageSource component on your form}
    Source.FormSection := 'Additional strings';
    { Getting value of String1 }
    S1 := Source.LoadString('String1', '');
    { Getting value of String2 }
    S2 := Source.LoadString('String2', '');
    { S1 and S2 are now localized. You can use them in any purposes}

    You can find an example of such string localization in DataM.pas module of Advanced Localizer demo application.
The difference between TQUserLanguageSource and TQLanguageSource with TQDBLanguageSource is that TQLanguageSource and TQDBLanguageSource take localization strings from a fixed source (a text file of fixed format and a dataset), but TQUserLanguageSource can take localization strings from any source. It contains a number of additional events that allow working with a source. So if you want to place localization string to a source different from a text file of the supported format and a dataset, you need to use TQUserLanguageSource.
It is the limitation of the trial version: the distributive of the trial version doesn't include files .dcu. To eliminate this error one should activate the option "Link with runtime packages" and add QLocalRT to the list in the Section "Runtime Packages" of the project settings.