Create a Multilingual Project

Pano2VR supports the use of translation files to easily build projects in multiple languages.

Pano2VR supports not only a translated project but a translated skin as well. This means you’ll find two options to translate; one in the project settings and one in the Skin Editor. Once a project and/or skin has translation files, you can use the skin to switch languages.

We are using the translation tool, Poedit. It is free and available across all operating systems.


Translating the Project

Hotspots, nodes, user data, project user data, and PDF files are examples of what gets translated in the project translation file.

  1. Download and install Poedit. This is the tool we use to create the translations.
  2. Go to the General Properties.
  3. In the Translations section, choose the project language. This is the default language.
  4. Click the button for Generate Translations Template. This will automatically create the translation template file and add it to the translations folder. This is a POT file that is compatible with Poedit.
  5. In the dialog that appears, click the link that will take you to the file’s location.
  6. Open the template file in Poedit. Note that it is a template file, not the translation file.
  7. At bottom of the Poedit window, click the big button that says Create new translation.
  8. Choose the language to translate to.
  9. Now you can start translating by selecting a line and at the bottom of the screen, for “Translation” type the translation. In the panel at the top-right, there are suggested translations that you can use by clicking on them. However, you can only use this 10 times in the free version. After that, you’ll be asked to upgrade.
  10. Save the translation and two files will be generated. Pano2VR uses the .po file.
  11. In the Skin Editor, add a button(s) to change languages.

All project text will now be translated. If you need to translate the skin as well, the steps are just about the same. See the next section.

★ Tip: If you’re using macOS, you can translate the text by selecting it, and in the context menu, choose Translate Text.

macOS translate text
macOS translate text

★ Tip: In the lower, right panel under Notes for translators, you’ll see where the correct text is from.

★ Any media (currently available only for PDFs, but all other media will be visible in the template as well.) added to the project will also appear in the tanslation file. It will show the file path of the media. To have the media change with the translation, add the filename and path (if not located in the same directory as the original media) that matches the language.

Translating the Skin

  1. Download and install Poedit. This is the tool we use to create the translations.
  2. Open the skin to translate.
  3. Click on the Generate Translations Template button in the Toolbar.
  4. This will automatically create the translation file and add it to the same location as the skin. This is a POT file that is compatible with Poedit.
  5. Open the template file and then click Create new translation.
  6. Start translating!
  7. Use a button in the skin to change language: Mouse Click > Player Settings > Change Language. Better yet, use a logic block to detect the browser language. Pano2VR automatically detects the browser language and if that language is in the translation, it will use that translation.

Button to Change Language

You can create language buttons many ways. Here’s one way to get you started that changes between two languages.

  1. Add a container, a graphic/button for each language, and a text box.
  2. Make all elements children of the container.
  3. For the text box, add default text. For example, “Deutsch”.
  4. Add a logic block for Text with the condition: Trigger = Language (Player > Langauge); Comparison = start with; Value = de; Text = English. If the player detects the german language in the browser, then the text box will display, English.
  5. For one of the buttons/graphics, and an action to set the language: Source = Mouse Click; Action = Player Settings; Type: Change Language; Language = Project Language or one of translated languages. Repeat for the rest the buttons.

In the project above, the language buttons are set to show or hide depending on the current language. Do this by setting a Logic Block for the Visible parameter. Use the same condition as in step 3. Just change the langauge accordingly.

Update a Translation

If you added text to the project after the initial translation, you just need to make a new template and load it.

  1. Recreate the template file .pot by clicking the Generate Translations Template button. This will add the new text.
  2. Open the .po file.
  3. Go to the Translation menu and choose, Update from POT file. The PO file will now have the new text, ready to be translated.

See also