|Translate () to ()|
translate  to ( v)
The Translate () to () block is a Translate Extension block and a reporter block in Scratch 3.0. This block translates a string from the automatically detected language to the chosen language using Google Translate. There are currently 48 languages available.
This block requires a connection to the Internet, because it uses the Google Translate API to do so.
- To translate something to another language
when gf clicked say (translate [Hello] to (Dutch v))
- To create a game that allows several languages in it
when green flag clicked forever if <(Chosen Language) = [English]> then say [Hello] for (2) secs end if <(Chosen Language) = [Dutch]> then say (translate [Hello] to (Dutch v)) for (2) secs end if <(Chosen Language) = [German]> then say (translate [Hello] to (German v)) for (2) secs end end
- To speak something in a different language
when gf clicked set language to (chosen language) speak (translate [Hello] to (chosen language))
Bad word detection
When a user inserts an inappropriate word into the string input and clicks the block, it will not output the word. Some Scratchers have used this as a alternative to a whitelist for cloud chat projects, however it is not allowed as users can still send mean phrases that do not use bad words or bypass the bad words.