Language
language::translate reporter
Category Translate
Type Reporter
Introduced in 3.0

The Language block is a Translate Extension block and a reporter block in Scratch 3.0. This block returns the Scratch website language of the current user.

This block can be used with the translate () to () block, to translate to or from the end user's set language.

Example Uses

  • Showing text in the project viewer's language:
say (translate [This text will appear in your language] to (language:: translate):: translate)
  • To inform the user that the project doesn't support their language:
when green flag clicked
if <not <(language ::translate) = [English]>> then
  say (translate [Please note that this project only supports English, which may not be your language.] to (language ::translate) ::translate) for (7) seconds
end
broadcast (start the project v)
  • Confirming if the language set is actually their main language.
. . .
ask (join (join [So your language is ](language::translate))[?]) and wait
if <(answer) = (translate [yes] to (language::translate)::translate)> then
set [language v] to (language::translate)
broadcast (continue v)
else
ask [Then what is your language?] and wait
set [language v] to (answer)
broadcast (continue v)

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.