User Tools

Site Tools


code:commercial:hse-translator:getting-started

02 Getting Started

Installation

  1. Install the latest package of the JKI Simple Localization Toolkit
  2. Extract the .zip file which you have received from HSE
  3. Copy the folder hse-i18n_Source\Libraries\hse-i18n into your project folder /APP-NAME_Source\Libraries
  4. Add the Translator.ini to your existing Config/Unit_XYZ folder
  5. In your project explorer, include the new folder APP-NAME_Source\Libraries\hse-i18n
Directory Structure

Test

  1. Run the Test Translator API.vi of the Translator to test if it is working
  2. Run the Test Translator-UI API.vi of the Translator-UI to test, if it is working

Configuration

  1. Within the Translator-UI, create a new JSON Dictionary file on your hard disc
  2. Update Translator.ini located in your Config/Unit_XYZ folder so that the config key dictionary points to the new JSON Dictionary file
  3. Once per application: Make sure to start the Translator module before any other modules by adding it to the front of the modules list in config.ini
    • e.g. list = “Libraries\hse-i18n\Translator;Modules\Dummy”

Usage

  1. For each VI that should be translated:
    1. Use the Translator-UI to define all identifiers and translation phrases which should be used for that VI.
    2. Within that VI, call the Register VI-Request of the Translator and pass the VI reference.

If no language is set, the toolkit will use the current system locale.

Don't forget to set Caption Visible for the controls instead of Labels!


Setting for Non Unicode Programms


Additional Steps, if no HSE-Application Template is used

  1. The Toolkit makes use of our Project Structure. At least create two folders where APP-Name can be a name of your choice.
  2. Create a Config-Folder /APP-NAME_Config
  3. Create a Source-Folder /APP-NAME_Source
  4. Copy the the content of the folder hse-i18n_Config into your project folder /APP-NAME_Config
  5. create a config.ini which points to your Config/Unit

Examples

The repository contains a small example DQMH Module called Dummy in the \Modules subdirectory.

Register a VI for Translation

Send the VI reference to the Translator module:

Manually Translate a String

… in the Language Changed event:

code/commercial/hse-translator/getting-started.txt · Last modified: 2024/02/09 15:25 by alexander.elbert