Run these examples in Studio. Learn’s current embedded player uses an SDK that predates this syntax. The prepared workshop has saved wording in all seven Studio languages. To save your own wording in lessons 2 and 3, use a project you can edit in Studio.
1. Read marked display text
The moving-marker workshop has saved display wording for a window title, a label in the picture and a console message. Open its main program and look for the marker on each string.
Window Title !"Wording at creation"
Text 12,24,!"Hello, explorer!"
Try it
- Choose English in Studio and run the workshop. Read the window title and the message above the moving marker. Press Escape or Stop to finish.
- Choose a second Studio language and start a new run. Compare the title and message with the English run. See whether the marker still follows the same path.
- Use Edit original if Studio is showing a translated code view. Find the same marked literals in the original program.
Worked check
In French the title becomes Traduction à la création and the message becomes Bonjour, explorateur !. The saved display wording changes what you read. The moving marker keeps the same program, coordinate calculation and route.
2. Keep the program value
Use a plain string for data your program compares, stores or looks up. Use a marked string directly in a display command for a message the player should read in their language.
Console On
State$="Open"
If State$="Open" Then Print !"Door is open"
Print State$
End
Try it
- Choose English in Studio, paste this program into a new project and run it. Read both lines in the console.
- Open Project wording, select
Door is open, then choose a second language. Enter the display wording or use Translate this wording if available. Review it and choose Save wording.
- Close Project wording, choose that language for Studio and start a new run. Compare the first line, the printed state and the condition that led to the message.
Worked check
With saved French wording of La porte est ouverte, the first line changes to that sentence. The second line still says Open, and the condition still succeeds because the stored state is "Open".
3. Translate the same word in context
Two marked occurrences of the same word can carry different wording. A door status and a menu action can both say Open in English.
Console On
Print !"Open"
Print !"Open"
Print "Open"
End
Try it
- Choose English in Studio and paste the program into a new project. Treat the first line of output as a door status and the second as a menu action.
- In Project wording, use the bank and line numbers to distinguish the two marked occurrences. Save separate wording for each in the same language.
- Choose that language and start a new run. Check all three lines of output and open the original code to confirm that the literal text is still present.
Worked check
For French, use Ouvert for the status and Ouvrir for the action. These two values appear on the first two lines. The third line still says Open. The project saves the two display translations separately.