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.
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.
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.
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.
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.
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
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.
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}.
Right-Click on the storyboarder and select the set Language node.
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.