Basic Translation Tutorial
Prefer to watch?
PreReqs

Step 1: Start your mod with a context menu brick
1.1 Add the context menu brick

1.2 Update the Name and Title

1.3 Change Menu context to selection

1.4 Choose All URLs for Sites
🏁 Checkpoint


Step 2: Make an API Call
2.1 Click the + button below Context Menu to add a brick

2.2 Add the Translate brick

2.3 Select the Built-In Google Translate integration
2.3 Set the text to translate to the selected text.
2.4 Set the translation language your desired language code
2.5 Change the output variable to `response`
🏁 Checkpoint

Step 3: View the output of your response
3.1 Select text on the page above the Page Editor

3.2 View the Output in the Data Panel

🏁 Checkpoint
Step 4: Display the Response in a Sidebar
4.1 Add the Display Temporary Information brick

4.2 Give the Display Temporary Information Brick a title

4.3 Click the Render Document brick in the Brick Actions Panel

4.4 Rename Example Document to Translate

4.5 Replace the Example text element with the response
🏁 Checkpoint

Step 5: Save your mod and try it out
5.1 Click Save in the Mod Listing Panel

5.2 Select text, right-click, and choose the Translate action

Last updated
Was this helpful?

