Node Copied to Clipboard!

Localization


Localization is the process of adapting a product that has been previously translated into multiple languages to a specific country or region. Modest3D Editor allows users to localize their lessons\courseware.

Accessing Localization Tab

In this demo, we will create English and French language capabilities. In the scene I have 3 models, each with it's own label. We have a welcome message box and a Steps list containing 1 step and 1 description. We will be displaying all the text in English and French. Let's get started.

To access the Localization tab click on the three dots at the corner of any window in the editor and select localization.

Localization Tab overview

  • Language: this slot will allow the user to select one of the languages created.
  • Context Menu:
    • Delete: Allows you to delete selected key.
    • Add Key: Allows you to add a key.
    • Add Language: Allows you to add a language to the language dropdown menu.
    • Remove Current Language: Allows you do delete the language currently selected in the language dropdown menu.
    • Clear All: Allows you to clear all keys of selected language.
    • Reload All From File: Allows you to reload language values from the generated csv file.
  • Filter: this slot will allow the user to quick search created key’s.

Adding Languages

Right-click in the localization pane and select Add Language

Enter the language name, repeat this process for English and French

Now in the Language slot there should be 2 options English and French.

Adding Key/value pairs

The next step will involve pre-planning, Think of all the locations that are using text, that will be displayed. In this case I am using Text in the following places.

  • 3 sceneLabels
  • Step title
  • Step Description
  • MessageBox Title
  • MessageBox text

We will need to add a key for every different slot of text. Adding a new entry/key can be done by right-clicking in the Localization pane and slecting Add Key.

Click on the key in the Localization tab to see its properties.

  • Key: For the developer's use as a reference to the value.
  • Value: The actual text that will be displayed.

With English selected in the localization tab we can go through each key, name it and input their value in english.

For the Message Box we needed 2 Entries/Keys

  • 1st for the Message Box’s Title
  • 2nd for the Message Box’s Value

Currently the Message Box is empty, we will drag and drop our localization Entries/Keys into the appropriate slots. Select the Message box to see its current properties.

Ungraph the Text and the Title properties.

Drag the Localizations MessageBoxTitle key to the Message Box’s title slot and the MessageBoxText key to the Message Box's text slot.

Now if you play the lesson, you will notice the Message Box’s info has changed to the Entry/Keys assigned.

Now change the Language to French.

Notice when you click the keys how the value properties are now empty, it's because we haven't entered the french equivalent to the english data. We can do this in two ways:

  • 1st Enter the French values manually.

  • 2nd If you save your lesson, in the folder where you have your lesson saved a CSV file will be generated. This file can be opened in Excel and edited and filled with the French values. Then overwrite the CSV file.

Once the CSV has been edited and overwritten right-click in the localization tab and select Reload All From File.

Localizing Objects with Ungraphable Properties

You cannot ungraph the text properties of objects that are set up in the setup nodes such as the steps or labels therefore we will have to type in the key manually.

In a setup or steps(Setup) Node, click on the object you want to localize.

In this example, I will localize the ConeLabel(SceneLabel).

In its text property, type ${KeyName} where in this case it will be ${ConeLabel}.

Setting the Language

Right-Click on the storyboarder and select the set Language node.

In it's properties tab, type in the language property the name of the language as you have typed it in the localization tab.

Make sure to add the setLanguage node to the execution line before any text will appear.

changing the language property in this node will change the language of all the text in the lesson as long as you have set an alternative language value for its key.