Learn how to translate text to different languages in Scratch and have a sprite speak the translation out loud.
We will be coding a project to allow us to translate from English to another language.
Go to the Scratch website and create a new project, you can delete the cat sprite.
https://scratch.mit.edu/projects/
Go to the Scratch website using the link below and click on the 'Create' link in the blue bar at the top.
By default, each new project starts with the cat sprite already added. To delete the cat click on the x in the blue circle beside the cat in the sprite list.
Add the Translate extension to your project.
Scratch Extensions are additional sets of blocks that expand the capabilities of your Scratch projects. They allow you to:
When you add an extension to your project:
Add the Text to Speech extension to your project.
Scratch Extensions are additional sets of blocks that expand the capabilities of your Scratch projects. They allow you to:
When you add an extension to your project:
Add the Kai sprite from the library. We will use this sprite to ask what you want to translate and to say the answer.
Add the following code to the Kai sprite to position him in the centre.
when green flag clicked
go to x: (0) y: (0)
To add a sprite from the sprite library follow these steps:
You can use search box or the filter links (Animals, People, Fantasy etc) to locate your sprite.
We need the following 2 variables in our project:
Create the 2 variables.
In the Variables palette, create a new variable by clicking the 'Make a Variable' button.
Once you click this button a box will appear asking what you want to call your variable. Give it a name that reminds you what you will be using it for. For example, if you wanted to keep track of your score in a game, you would create a variable called 'score'.