Packet Tracer Translation Process


Packet Tracer supports semi-automated translation to all Unicode-supported languages. The first part of this guide explains the translation process for the main application. The second part explains the process for translating the help files. A short FAQ guide is provided at the end of each part to answer questions regarding the processes.

Overview

The translation process involves the translation of three separate parts of the program, each one with a small dependency on the translation of the Main Application. The most important translation is the main application as described in Part 1 and 1a. This will translate the interface of the program. The help file screenshots depend on the translation of the main application in order to display the graphics in the translated language. The save files reference the language files to use upon opening the program so that the program will display in the native language of the save file if available.

To standardize the language files, the naming convention for language filenames should follow ISO 639-2. Packet Tracer uses the Alpha-3 code for representation of names of languages. A list of language names to code is defined here: ISO-639-2_values_8bits-utf-8.csv. An example of an appropriate name is: "English_eng".

Translation Best Practices

Please consider the following best practices when translating:

Part 1: Translating the Main Application

Required Tools

Qt Linguist is a part of general Qt distribution packages. At the time of this writing Cisco Packet Tracer was built with Qt5.5.1, which could be downloaded from Qt archives. Given that WWW hyperlinks may change over time, a more general solution may be to search the web for "qt linguest download" phrase.

Setup:

You can translate to another language or change/continue translations on a previously translated language file. If you are translating to a new language, copy "template.ts" to "<new language name>.ts". Be sure that the <new language name> follows the ISO 639-2 standard defined in the overview section above.


Instructions:

  1. Open Qt Linguist.

  2. Go to File-->Open and choose the "<language name>.ts" file to translate.

  3. Select an unfinished context on the left navigation bar.

  4. Enter the text in the Translation text field and mark finish by pressing Ctrl + Enter. (See additional important notes below.)

  5. Release the language file [File-->Release As…], from fromat type menue select All files (*) and save it as "<language name>.ptl" in the "\languages" folder. Remember to save this project (the .ts file) by [File-->Save As…] as well as releasing it. The help files will reference this project file.

  6. Open Packet Tracer. In the Options-->Preferences, Interface tab, select the recently translated language and restart Packet Tracer.

  7. Packet Tracer is now translated.

Some Important Notes:

  1. Variables: %1, %2, %3, %n, and [[SOME_VAR_NAME]]. Do NOT translate those variable names. However, moving the variables as makes sense is fine.

  2. Accelerators: The character "&" defines an accelerator key. An example of an accelerator is &File, pressing Alt-F on the keyboard is equivalent to clicking on the file menu. When you are translating to another language, an accelerator key can be placed on any character, but be sure to not use the same character twice.

  3. Rich text: HTML tags may be used to manipulate the text shown on screen. Rich text is useful for certain language fonts that are too small or too large.

FAQ:

Q1. Where do I find the "template.ts" file?
A1. It is located in the "languages" folder of the installation path for the application. Example: "C:\Program Files\Packet Tracer 5.2.1\languages"

Q2. Do I need to translate the whole file before I can see the results?
A2. To see the results at any point in the installation, just release the file and place it in the languages folder. Then select the language in the Preferences window of Packet Tracer.

Q3. I have some network files (.pkt) and some activity files (.pka) that need to be translated. How do I go about translating those?
A3. To translate the content in the saved files (e.g., device names, information boxes, or activity instructions), you must open those files and edit them in Packet Tracer.

Part 1a: Translating the Main Application Using Prior Translations


This section provides guidelines for updating translation files created for prior releases of Cisco Packet Tracer. Initial Requirements and Setup, when following this route, are identical to those from Part 1 above. For the purposes of this section we will assume the following:

  1. You have a file from a preexisting version of Packet Tracer: translated.ts or translated.ptl.

  2. Qt Linguist environment and tools have been setup per instructions from Part 1 above. This ensures you have a command line tool called lconvert that can be located in your Qt-Install/bin folder.

  3. Cisco Packet Tracer is installed in a folder we would refer to as App-Install.

 

Additional Setup:

In the case you already have a translated.ts file for some other version of Cisco Packet Tracer, copy it to the directory App-Install/languages.
In case you do not have translated.ts file, but rather have translation.ptl instead, you would need to convert the latter to translated.ts by running the following:

  1. Start command line or terminal.

  2. Change current directory to App-Install/languages.

  3. Copy your existing file translated.ptl to the directory you are in.

  4. Rename translated.ptl to translated.qm.

  5. Run the following command on the command line:
                     
    Qt-Install/bin/lconvert -i translated.qm -o translated.ts
    After this you will see a file named
    translated.ts alongside translation.qm.
    This operation can only be attempted by loading
    translated.qm into Qt Linguist and saving it as translated.ts.

Translation Instructions:

  1. Follow steps 1,2,3 from the Additional Setup section above.

  2. Merge existing translated.ts file with the file containing all untranslated application text from your current version of Cisco Packet Tracer. The latter is stored in App-Install/languages/template.ts. In order to perform this merge, run the following on the command line:
                      
    Qt-Install/bin/lconvert -i template.ts translated.ts -o translated-new.ts -no-obsolete
    After this step
    translated-new.ts file will contain all text untranslated from current application release as well as the text from your original translated.ts merged together and saved in translated-new.ts. The order of the file names in the above command listed after -i option is important!

  3. Update un-translated text from translated-new.ts as described in the previous section, using Qt Linguist, and then release as described there as well.
     

Notes:

  1. Having performed step 2, from Instructions section above, it is possible to run the following command in order to obtain a translated-untranslated-only.ts file, which would contain only text that is untranslated in translated-new.ts.
                      Qt-Install/bin/lconvert -i translated-new.ts translated-new.ts -o translated-untranslated-only.ts --no-finished
    After this, you would follow up with translating the translated-untranslated-only.ts using Qt Lingust, as described above and after this is done you would merge it back with your translated-new.ts by running the following
                     
    Qt-Install/bin/lconvert -i translated-new.ts translated-untranslated-only.ts -o translated-new.ts
    After this step you can release the translated-new.ts, using Qt Lingist as described in above sections.

  2. After you load any .ts file into Qt Linguist, make sure to check that translation settings for it are set correctly by navigating to Edit/Translation File Settingsmenu and updating the form as needed in the dialog that opens. Alternatively, often times, this dialog form will open up on its own when you load a .ts file for which translations settings have not been set.

Part 2: Translating the Help Files

Required Tools

  1. Fully translated Cisco Packet Tracer

  2. A text editor (for example, Notepad++); however, it is recommended that you use an HTML editor (for example, Adobe Dreamweaver)

  3. GIMP to take and edit screenshots.

  4. Adobe Captivate for translating tutorials

Translating HTML Text Content:

Working in the duplicate folder (e.g., "\help\japanese_jpn"), open each .htm file in a text editor or HTML editor (recommended). Translate the text content in each file and save when finished.

Note that the HTML source code uses the style sheet definitions found in the "styleMenu.css" and "styleNormal.css" files.

Recapturing Screenshots:

  1. Start Cisco Packet Tracer.

  2. If Packet Tracer is not already using the desired language, go to Options->Preferences and change to the desired language. Also disable screen reader support if not already done so. Restart Packet Tracer.

  3. Click on the desired window to capture (e.g., the Activity Wizard Answer Network page).

  4. Hold down the Alt key on the keyboard and press Print Screen on the keyboard.

  5. Open an image manipulator program and create a new blank document.

  6. Go to Edit > Paste to paste the screen capture into the new blank document.

  7. Add any additional edits to the screenshot.

  8. Go to File > Save As and browse to the images directory (e.g., "\help\japanese_jpn\images\").

  9. Save the image using the same name as the original screenshot and in the JPEG format (e.g., "activityWizard_answerNetwork_1.jpg").