Quick Start Guide

Contents

With TsiLang and the bundled TsiLang Expert, translating your project becomes as effortless and enjoyable as playing your favorite game.

Installation (Trial Version)

  • Close all running instances of RAD Studio, Delphi, or C++ Builder.
  • Run TsiLangTrialSetup.exe and follow the instructions.
  • Once the installation script is finished, TsiLang Components Suite will be automatically installed into the selected IDE(s).

Installation (Trial Version)

Note: If you have previously installed a trial version of the TsiLang Components Suite, please uninstall it from your PC and ensure that all its files are completely deleted.

  • Close all running instances of RAD Studio, Delphi or C++ Builder.
  • Run SISETUP.EXE (SIBINARY.EXE in case of DCU-Only Edition) and follow the instructions. The installation script will install source files to destination folder and adjust library path for the selected IDE(s).
  • Once the installation script is finished, TsiLang Components Suite will be automatically installed into the selected IDE(s).

Implementing localization / multilanguage support

Note #1: You can watch a detailed demo video at the following URL: https://www.sicomponents.com/video-tsilang-live-demo/

Note #2: The translation example below is a simplified demonstration and is intended for illustrative purposes only.

To implement localization/multilanguage support in your project, follow these steps:

  1. Open the project you want to translate.
  2. From the main menu of the IDE, select Tools | TsiLang Expert. (TsiLang Expert is a powerful tool designed to simplify the translation process of your project).
TsiLang Expert
TsiLang Expert

To continue the localization process using TsiLang Expert, please follow these steps:

  1. In the TsiLang Expert command panel, select Selected | Wizard.
  2. On the first page of the wizard, click the Next button.
  3. From the list of forms, select the main form of your project.
  4. In the combo box on the right, set the type to TsiLang for the main form.
  5. For all other forms in the list, set the type to TsiLangLinked.

These settings will ensure that the main form and other forms in your project are properly linked with TsiLang for translation purposes.

Translation Wizard. Step 1
Translation Wizard. Step 1
  1. In the TsiLang Expert’s translation wizard, on the second page, adjust the settings according to the figure below.
Translation Wizard. Step 2
Translation Wizard. Step 1
  1. Once you have completed the wizard, you can open the Translation Editor in TsiLang Expert by following these steps:

    1. In TsiLang Expert, locate the form that you want to translate.
    2. Double-click on the form to open the Translation Editor.
    3. The Translation Editor will display a list of properties and components  that can be translated.
    4. Select the desired component or property that you want to translate.
    5. Enter the translation in the appropriate language column.
    6. Repeat the above steps for all the components and properties you want to translate.
    7. Save your translations when you’re done.

    The Translation Editor provides a convenient interface for managing the translations of your forms.

Translation Editor
Translation Editor

If you want to exclude certain component properties from being translated, you can simply leave the corresponding language field blank in the Translation Editor. This indicates that the property should remain unchanged and not be translated.

Another way to exclude a component or property from translation is by using the right-click menu in the Translation Editor. Here’s how:

  • Locate the component or property that you want to exclude from translation.
  • Right-click on the component or property to display the context menu.
  • From the popup menu, select the “Exclude” command.

By selecting the “Exclude” command, you indicate that the component or property should be excluded from the translation process. This means that it will not be modified or translated when you perform translations.

This method provides a convenient way to quickly exclude specific components or properties from translation without having to leave the Translation Editor.

Language switching code

To change the active language programmatically you can use ActiveLanguage property of the TsiLangDispatcher. Below is the sample code how it can be done in Delphi:

procedure TMainForm.MenuItemGermanClick(Sender: TObject);
begin
  siLangDispatcher1.ActiveLanguage := 2;
end;

procedure TMainForm.MenuItemEnglishClick(Sender: TObject);
begin
  siLangDispatcher1.ActiveLanguage := 1;
end;

Translating strings in source code

TsiLang Expert provides a convenient feature to analyze your source file, collect, and translate strings and string constants used in your Delphi project. Here’s how you can use this feature:

  1. Select form to analyze in the TsiLang Expert list.
  2. In the TsiLang Expert  click on the Strings in Source | With Form option in the command panel.
  3. TsiLang Expert will scan your source file and collect all the strings and string constants used in your code.
  4. The collected strings will be displayed and you can skip particular if needed.
  5. You can then proceed to translate the collected strings by providing the translations in the Translation Editor.

By using the “Strings in Source | With Form” option, TsiLang Expert will analyze your source code and extract the strings automatically, saving you the effort of manually identifying and collecting the strings for translation.

Strings in source
Strings in source

Translating DBGrids

To translate TDBGrids using TsiLang, follow these steps:

  1. Add the necessary fields in the TDataSet fields editor.
  2. Select Selected | Translate command in the TsiLang Expert’s commands panel. This will open the Translation Editor.
  3. In the Translation Editor, locate and select the DisplayLabels node in the translations tree. This node represents the DisplayLabel property of the fields in the TDBGrid.
  4. Enter the translations for the DisplayLabel property of the corresponding fields.
  5. After entering the translations, click File | Close Saved in the Translation Editor’s command panel to save the translations and close the Translation Editor.

By following these steps, you will be able to translate the DisplayLabel property of the fields in the TDBGrid using the TsiLang and the Translation Editor.

Additionally, if you prefer to translate grids without adding fields, you can use the Collections property of TsiLang. In this case, you would translate the items of the Columns property of the grid, which represents the column headers and other properties of the grid’s columns.

And finally,

compile your project to generate the multilingual application. With the translations in place, you are now ready to deploy your application and reach new regional markets. By offering your software in multiple languages, you can attract a wider audience and potentially increase your revenue from these new markets. Good luck with your multilingual application!

TsiLang Components Suite:

Copyright © 1998-2024 Igor Siticov, SiComponents. TsiLang®, Resource Builder® and SiComponents® are registered trademarks of Igor Siticov.
RAD Studio, Delphi and C++Builder are trademarks and/or registered trademarks of Embarcadero Technologies, Inc.

Follow us: