Colabs Project

Language issues in Imagine

Changing Imagine command language

Imagine currently exists in 6 language mutations - English, Slovak, Standard Portuguese, Brazilian Portuguese, Polish and Hungarian.
Each language edition of Imagine has its own user interface language (it is the language in which menus, dialog boxes and Help is written) and also its command language (it is the programming language used by Logo programmers).
The user interface language is fixed and depends on the exe file, which is running.
The command language, on the other hand, can be changed. However one project can use only one command language.

Why might I need changing the command language in Imagine?

    There are two main reasons:

    1. You want to write a program in a different language to be understood (and used or even enhanced) by somebody in a different country. The most usual case is if you use a non-English language mutation of Imagine and you want to write English programs to be understood by people in different countries. In this case you must be able to program in the changed command language.
    2. You have received (found on the Web, got from a friend) an Imagine program written in a different command language and you want to run it in your language mutation of Imagine. In this case you do not need to understand the commands in the program. Imagine will just run that program and you can use it.

How can Imagine learn (install) a new command language?

    Each language mutation of Imagine prefers its own command language. It means that if you start Imagine with an empty project (and you take no special actions like ones described below) then its command language is set to the same language as its user interface language. Each non-English language mutation of Imagine includes also the knowledge of English command language. Any language mutation of Imagine can "learn" a different command language if a command language definition file is supplied to it. A command language definition file is a file with LDX extension, which is contained in LDX.ZIP, which can be downloaded from Teaching Imagine a new command language is easy, just the corresponding LDX file has to be copied to the same folder where Imagine.exe is located. LDX.ZIP also contains a helper file eraser.exe, which is needed by Imagine to support command language switching. Most language mutations of Imagine contain this file, but we added it here because the English language mutation does not contain it.

My Imagine.INI has commands written in a specific command language and they would not be understood when switching to another language. What to do?

    Imagine.ini is a special file located in the Imagine folder (the folder where Imagine.exe is located, too). It contains Logo instructions, which should be carried out each time when Imagine starts and also each time when an existing project is being opened or a new empty project is created. Imagine.ini allows the advanced user to write commands, which modify the standard default behaviour of Imagine. Commands in Imagine.ini can be written in "language independent" way, but this way of writing commands is quite complicated and usually only expert users of Imagine do it. Some language mutations of Imagine (including the English mutation) use language specific commands in Imagine.ini directly when installed from the CD. Other languages install a language-independent Imagine.ini, but advanced users may add some language-specific commands into it.
    If Imagine.ini contains language-specific commands then it will cause problems when switching to another command language because then these commands will not be understood and errors in Imagine.ini will be reported.
    The solution is to rename imagine.ini to another name, which includes the name of the language (see exact instructions in point 3 of the step-by-step guide) and then using a special imgaine.ini, which can be downloaded from imagine.ini. This Imagine.ini will examine the current command language of Imagine and will call the language-specific imagine.ini file if present. This way your Imagine can contain several ini files specifically for each command language.

So, after all preparations, how to change the command language?

    • If you have an IMP file prepared in a specific command language then Imagine tries to switch to that command language when loading the IMP file. If the command language of the IMP file matches one of the installed command languages then Imagine automatically switches to it and loads the IMP file correctly.
    • If you want to switch to another command language manually to start a new project in a different command language then you can choose the desired language from the Options menu.

How can I permanently override the default command language?

    By default each time Imagine starts with command language, which is equal to the user interface language. If this default is not convenient for you (e. g. you want to work for a longer time with Hungarian Imagine but creating English projects) then you can override the default.
    To do it you must locate the icon, which you use to start Imagine. It may be on the desktop, on the Quick Launch bar or in the Start menu. Alternatively you can make a copy of that icon leaving the original one untouched and modifying only the new one.
    Right-click the icon and select Properties in the popup menu. In the dialog's Target line add a command-line switch /v:xxxxxxxxx where xxxxxxxxx denotes your desired language as listed in the following table:


    Command line switch to add

    Brazilian Portuguese










    Standard Portuguese


    Do not forget to add one space before the /v switch and do not put any space inside the added text (there is no space around the colon character).

What about texts in programs, which use special characters?

    If you run a program written in a different language, there is always a risk that your computer will not contain the correct fonts i.e. that it will not be able to show special characters of that language. This paragraph tries to introduce information about these issues and may help you to understand better what can happen.
    Texts written in textboxes and saved with the project usually preserve their characters correctly if the computer, which runs the project, has installed the correct fonts. Usually all European versions of Windows install all fonts for all other European languages.
    Texts written in the program's code may show incorrect fonts when run on a computer, which Windows defines a different default character encoding. Even if the program shows incorrect characters, it can run correctly, just it may display unreadable texts. At this moment this behaviour cannot be changed. In Windows XP there is a way to change the character encoding for all non-Unicode programs (Imagine as a non-Unicode program). So if you need to see correctly the characters of Imagine programs written in a foreign language then you can use this switch of Windows XP.
    For Windows 98 you may know that some European languages share the same character encoding (code-page), so sharing programs between these languages should not introduce font problems in Windows 98. Polish, Hungarian and Slovak language share one code-page while Portuguese (both standard and Brazilian) use another code-page.
    The characters for English alphabet are always present in any national language mutation of Windows. Therefore the safest way to write programs, which should be shared by international users, is to use English command language and also English texts shown by the program on the screen.

So what to do exactly and step by step?

    If you want to add the ability to switch the command language to any of the currently existing command languages do this:

    1. Find the folder where is Imagine.exe (Imagina.exe in Standard Portuguese edition) located (C:\program files\Imagine or C:\program files\Imagine Logo). We refer to this folder as Imagine folder in later points.
    2. If you are an advanced user and you know that your Imagine.ini file is language-independent then you can skip steps 3 and 4. If you are not sure then do steps 3. and 4. (Comment: you can be sure if your language mutation of Imagine is not English and you did not modify by hand Imagine.ini.)
    3. Rename Imagine.ini to a different name depending on the command language in which that file was written (it is usually the default language for your language mutation of Imagine) according to this table:


      Imagine.ini should be renamed to

      Brazilian Portuguese










      Standard Portuguese


    4. Download file Imagine.ini from imagine.ini and copy it to the Imagine folder.
    5. Download all from unzip it and copy all files into Imagine folder
    6. Now you can use all the command languages. You can switch them either by loading an IMP file written in one of those command languages or using The Options item of the main menu.
    7. If you want to use a command language, which is different from you default one, automatically after starting Imagine, then you can modify the Windows command, which starts Imagine. The section "How can I permanently override the default command language?" explains how to do it.

Using the translator program

    If you want to translate an IMP project written in one language version into another:

  • The program needs to have two kinds of files available before it can start

  • • Language files defining the specific command languages of Imagine. They have the extension LDI and they are provided with IMPTrans.exe

    • Description file For each primitive command of Imagine Logo command language it contains its textual description. This file is used when analyzing the project and for hinting the user in the manual phase of translation. It is a text file, so the user may change the descriptions.

  • After opening a project file, the program knows its command language and reads the appropriate LDI file automatically

  • The user can now set the desired output command language

  • The program reads the LDI file for the output command language

  • The translator reads the file and prepares its internal tables for translation

  • • For each word in the input project creates a list of possible translations

    • For each word, which has to be translated appends its description and comment from the file

  • Now the program creates a list of all words, which do not have an automatic translation and writes them into the table on the second tab of the program. These words include user-defined names for procedures, variables, objects and classes.

  • Now the user can translate manually these words

  • After pushing the Translate button the translator program tries to translate all unambiguous words using its table of primitive words and the user-supplied table for translating user-defined words.

  • After the translation it may happen that some words are still not translated due to their ambiguity. The program can show these words in the context, where they occurred, to the user and provide him/her with possible translation. The user chooses one possible translation for each such word.

Back to top