Tutorial
 

The installation and use of FXInterpreter is simple and quick, in a few minutes the project is ready for the new multilanguage management.

 
 

Setup

 

Retrieve the FXInterpreter setup from the "Downloads" page of the web site, execute and follow instructions.

Read the EULA file (End User License Agreement).

 

Add to the project

 

From the menu "Start / Programs / Activa /
FXInterpreter" start the "Interpreter Application Wizard" to create the FXInterpreter files in the iFix application.

Open the iFix application, open the VBA environment and import the module "modInterpreter.bas" in the "Project_User" (the module is in the "FXInterpreter" folder, within the pictures folder).
 

 

In the "Project_User" add the reference
to the “FXInterpreter” library.



Open and edit the configuration file “FXInterpreter.ini” in the “FXInterpreter” folder of the application (if necessary).

 
  To begin

  • If you don’t have a license for FXInterpreter, the iFix hardware key must NOT be used: the module will run for 2 hours in demo mode.

  • Before opening a picture, insert the following code:

    Interpreter.TranslatePicture "PictureName" (with quotes)

    Example:
    Interpreter.TranslatePicture "picLayoutMainView"
    OpenPicture "picLayoutMainView"


  • To set a specific global language and immediately translate all the pictures (without having to close and reopen, as happens without FXInterpreter), insert the following code in the script of a button:

    Interpreter.GlobalLangNum = LanguageNumber   
    Interpreter.TranslateAll

    Example:
    Interpreter.GlobalLangNum = 2
    Interpreter.TranslateAll


  • At the end of the "CFixPicture_Initialize" event code of pictures that open automatically at startup, insert the following code (as written):

    Interpreter.TranslatePicture Me.Name

 
  • Start the project and open pictures to automatically edit the development language column in the dictionary.

  • Close the Workspace and open the Excel file"FXInterpreter.xls" (in the "FXInterpreter" folder of the project) to type in translations.


  • Restart the Workspace and verify translations in graphics.

  • To disable the FXInterpreter initial splash screen, click on the “Startup configuration” button and set the parameter "ShowInfoPanelOnStartup=NO”
    in the configuration file “FXInterpreter.ini”.
  Tips

  • Translations included in the dictionary should not be longer than strings used in graphics, for obvious reasons of space.

  • Translations should be unique just like all the strings in the development language column of the dictionary; in this way it is possible to obtain an unique relationship between strings in different languages.
  • Just as in the multilanguage management of iFix, text animations must be implemented through the visibility of more overlapping Fix2DText objects, i.e. direct animation of the caption of a single object should not be used (with a local or global strings table).
  • To further restrict the dictionary to include only strings of interest, you can identify items to be translated using a prefix in the name of the objects. To obtain this, it is enough to open the "FXInterpreter.ini" file (in the "FXInterpreter" folder of the project) and type "GetObjectsPrefix = YES"; the default prefix "ObjectsTargetPrefix" is  "TR_" (TRanslate), but it can be changed as desired.

    If "GetObjectsPrefix=NO" then all the Fix2DText and commandButton objects (with tooltips) will be translated, as well as all the VBA default objects. In this case, as in multilanguage management of iFix, it is essential that, for viewing numeric tags, the developer uses DataLink objects and not Fix2DText.
  • Apart from the use of FXInterpreter, it is a good rule that the names of pictures, forms and objects do not contain accented letters or graphic signs characteristic of particular languages.
  • To prevent errors in displaying translations, verify any system settings in the Control Panel of Windows ("Control panel \ Regional and language options \ Advanced \ Language for non-Unicode programs") and provide for changes BEFORE creating graphics. For example: to display translations in Bulgarian with English version of Windows, it is recommended that you select “Bulgarian” from the drop down list.

    The issues related to the language of the operating system, the fonts and system settings do NOT depend on FXInterpreter; in these cases it is useful to read the online help of iFix.
    In particular, note that Windows localization limits the languages you can switch between!

For a correct use of FXInterpreter and to take advantage of its many innovative functions, it is suggested that you read the User Guide that comes installed with the product.