Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 2D Blocks
  4. The "Translate" Extension

The "Translate" Extension

Scheduled Pinned Locked Moved 2D Blocks
1 Posts 1 Posters 705 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

    Introduction

    You can use the “Translate” extension to translate some text to a target language.

     
     

    Add the Translate Extension

    You can click on the extension button at the bottom left, then select the Translate extension to add it:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/65278809-643e-4fb0-a066-ca4978a3473d.gif" width="1000" style="border-radius: 5px; border: 1px solid #29622d;">

     
    There are 2 blocks in this extension:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/b7246596-191a-4f22-a8ec-fbe1be8a539a.png" width="350" style="">

     
     

    The “language” Block

    The “language” block tells us the local language used by the current user. When you switch the playground’s interface to another language, this block will report the updated language as well.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/5687d1be-8c8b-43a0-81ad-242794153427.gif" width="1000" style="border-radius: 5px; border: 1px solid #29622d;">

     
     

    The “translate to” Block

    This block takes 2 inputs:

    • Any text that you want to translate from
    • The target language that you can select from the dropdown

    Since this is a reporter block, it will report a value directly, which is the translated text.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/85dfdf51-0bce-4830-8766-4abd43f2dbc4.gif" width="600" style="border-radius: 5px; border: 1px solid #29622d;">

     
     

    Translate to User’s Language

    We can easily combine the 2 blocks above to achieve a useful feature: translating to the user’s language automatically.

    For example, suppose your project will say “how are you?” to the user. You can put the “language” block into the language selector of the “translate” block, so that the sentence will be translated to the language used by the user.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/b50c0370-8c02-40c8-835f-451487c1e52c.gif" width="600" style="border-radius: 5px; border: 1px solid #29622d;">

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode