- 🌐 Translate - Language Translation in Scratch
- 🌟 Overview
- ✨ Key Features
- 🚀 How to Use
- 🧱 Blocks and Functions
- 🌍 Supported Languages
- 🎓 Educational Uses
- 🎮 Example Projects
- 🔧 Tips and Troubleshooting
- 💡 Creative Tips
- 🔗 Combine with Other Extensions
- 🔒 Privacy and Safety
- 🧪 Technical Info
- 🔗 Related Extensions
- 📚 Learn More
🌐 Translate – Language Translation in Scratch #
The Translate extension brings powerful language translation directly into your Scratch projects.
Convert text between languages instantly, create multilingual projects, build language learning tools, and make your projects accessible to people worldwide – all with simple blocks that use real-time translation services.
Supports 50+ languages with automatic detection. ✨
🌟 Overview #
- Instant Translation: Convert text between 50+ languages in real-time.
- Auto Language Detection: Automatically detects your editor’s language as the source.
- Flexible Translation: Set source language manually or let it auto-detect.
- Google Translate: Reliable cross-platform translation service.
- Easy Integration: Three simple blocks – translate, set language, get language.
- Perfect for Global Projects: Make your projects speak to anyone, anywhere.
✨ Key Features #
- 50+ supported languages from around the world.
- Real-time translation with cloud service.
- Automatic source language detection based on editor locale.
- Manual source language override for multilingual workflows.
- Smart caching – avoids repeated translations of same text.
- Accepts language codes or language names (in any language!).
- Perfect for language learning, accessibility, and global collaboration.
🚀 How to Use #
- Go to: pishi.ai/play
- Open the Extensions section.
- Select the Translate extension.
translate [WORDS] to [LANGUAGE]: Use this block to translate text!set language [LANGUAGE]: 🤖 Optional – Set your source language.
Tips
- The extension automatically detects your editor’s language as the source.
- You can manually set the source language for text in a different language.
- Translations are cached – repeating the same translation won’t make extra requests.
- Requires internet connection – cloud translation service.
- You can drop language names (from any language) into the language menu.
🧱 Blocks and Functions #
🔄 Translation Block #
translate [WORDS] to [LANGUAGE]
Translates text from the source language to the target language.
Returns the translated text as a string.
How it works:
- Type or insert text to be translated.
- Select the target language from the menu.
- The block sends the request to the translation service.
- Translation is returned instantly.
- Source language is automatically detected (or use “set language” to specify).
Arguments:
[WORDS]– Text to translate (string)[LANGUAGE]– Target language (menu or text input)
Examples:
translate [hello] to [Spanish]→ Returns “hola”translate [good morning] to [French]→ Returns “bonjour”translate [cat] to [Japanese]→ Returns “ネコ”translate [How are you?] to [German]→ Returns “Wie geht es dir?”
Special Behaviors:
- Numbers-only text: If text contains only digits (0-9), it returns unchanged without making a request.
- Smart caching: If you translate the same text to the same language twice, the cached result is returned (no extra request).
- Flexible input: The language menu accepts language codes (en, es, fr) or full language names in any language!
🗣️ Language Configuration #
set language [LANGUAGE] 🤖 (Pishi.ai Exclusive)
Sets the source language for translation (what you’re translating FROM).
Overrides automatic detection based on your editor’s language.
How it works:
- By default, uses your editor’s language as the source.
- Use this block to specify a different source language.
- Affects all subsequent translations until changed.
Arguments:
[LANGUAGE]– Source language (menu or text input)
Examples:
set language [Spanish]→ All future translations will assume Spanish as sourceset language [Japanese]→ All future translations will assume Japanese as source
Use Cases:
- Multilingual projects where source language changes dynamically.
- Working with user input in different languages.
- Language learning projects with various source languages.
- Translating between any two languages (not just from editor’s language).
- Language detection games with programmatic language switching.
language
Returns the current source language name as text.
How it works:
- If you’ve set a source language with “set language”, returns that language name.
- Otherwise, returns the editor’s language name.
- Returns localized language name based on editor’s current language.
Creative Uses:
- Display current language setting to users.
- Build language switchers that show active language.
- Create conditional logic based on language.
- Debug translation flows by displaying source language.
🌍 Supported Languages #
The Translate extension supports 50+ languages. Here’s a sample of the most commonly used:
Major Languages:
- English (en)
- Spanish (es) – Spanish (European)
- Spanish (Latin American) (es-419)
- French (fr)
- German (de)
- Italian (it)
- Portuguese (pt)
- Portuguese (Brazilian) (pt-br)
- Russian (ru)
- Chinese (Simplified) (zh-cn)
- Chinese (Traditional) (zh-tw)
- Japanese (ja)
- Korean (ko)
- Arabic (ar)
- Persian (fa)
- Hindi (hi)
Additional Languages:
- Dutch (nl), Polish (pl), Turkish (tr), Swedish (sv), Norwegian (nb), Danish (da)
- Greek (el), Finnish (fi), Czech (cs), Romanian (ro), Hungarian (hu)
- Thai (th), Vietnamese (vi), Indonesian (id), Malay (ms), Filipino (tl)
- Ukrainian (uk), Bulgarian (bg), Croatian (hr), Serbian (sr)
- And many more!
Language Input Flexibility:
- You can use language codes (en, es, fr, de, etc.).
- You can use language names in any language (English, Español, Français, 日本語, etc.).
- The extension automatically converts language names to codes.
🎓 Educational Uses #
- Language Learning: Create vocabulary flashcard projects with translations.
- Build phrase translation tools for language practice.
- Make interactive language quizzes – show word in one language, ask for translation.
- Create pronunciation guides by combining with Text to Speech extension.
- Develop multilingual storytelling projects – switch between languages dynamically.
- Teach cultural awareness by showing how phrases differ across languages.
- Build accessibility tools for multilingual classrooms.
- Create global collaboration projects where students from different countries can communicate.
🎮 Example Projects #
- Language Flashcards: Show word in English, user guesses, reveal translation.
- Multilingual Chatbot: Sprite understands and responds in multiple languages.
- Translation Quiz Game: Give word in one language, player selects correct translation.
- World Tour Storyteller: Story changes language based on location in the world.
- Language Learning App: Teach common phrases with translation and pronunciation.
- Universal Greeter: Greet users in their language based on selection.
- Subtitle Generator: Display translated subtitles for spoken dialogue.
- Language Detective: Player identifies language from translated phrases.
- Multilingual Dictionary: Search words, see translations in multiple languages.
- Cultural Exchange: Share facts/jokes in different languages with translations.
🧩 Try it yourself: pishi.ai/play
🔧 Tips and Troubleshooting #
🌐 Translate Specific Tips #
- Translation not working? This extension requires an internet connection – translation service is cloud-based.
- Wrong translation? Make sure the source language is correct. Use “set language” to specify source if needed.
- Translation seems incorrect? Machine translation isn’t perfect – context matters. Try rephrasing for better results.
- Same translation over and over? The extension caches results – if you want a fresh translation, change the text slightly.
- Language name not recognized? Use the dropdown menu or try the language code (en, es, fr, etc.).
- Numbers not translating? That’s correct! Numbers (0-9 only) return unchanged to save bandwidth.
- Slow translations? Network latency affects speed. Keep text short for faster responses.
- Want offline translation? Not available – cloud service required for translation quality.
- Service limits? Free tier has usage limits – excessive translations may fail temporarily.
💡 Creative Tips #
📚 Language Learning Projects #
- Vocabulary Builder: Create lists of words, translate them, test with quizzes.
- Phrase of the Day: Display common phrases with translations and pronunciation.
- Interactive Conversations: Practice dialogues in target language with translations.
- Story Translation: Read story in one language, translate sentences to another.
- Grammar Explorer: Show sentence structures across different languages.
🌍 Multilingual Applications #
- Language Switcher: Add buttons to change interface language dynamically.
- Localized Messages: Store English text, translate to user’s language on-the-fly.
- Multi-Language Help: Provide instructions in multiple languages.
- Cultural Adaptations: Change not just language, but cultural references too.
🎭 Creative Storytelling #
- Polyglot Characters: Characters speak different languages, with subtitles.
- Language Puzzles: Decode messages by translating between languages.
- World Travel Simulator: Learn phrases as you “travel” to different countries.
- Time Travel Languages: Show how languages evolved (using modern equivalents).
🔗 Combine with Other Extensions #
🔊 Translate + Text to Speech #
- Translate text to target language, then speak it with Text to Speech.
- Create pronunciation guides for language learners.
- Build voice-enabled multilingual assistants.
🎤 Translate + Speech Recognition #
- User speaks in their language, speech is recognized, then translated.
- Create real-time language interpretation tools.
- Build voice-controlled multilingual interfaces.
💬 Translate + ChatGPT #
- Get AI-generated text in English, translate to user’s language.
- Create multilingual chatbots with AI responses.
- Build global assistant projects that understand any language.
🔒 Privacy and Safety #
- Text is processed by Google Translate (no permanent storage).
- Requests include text, source language, and target language.
- Avoid translating sensitive or personal information.
- Service has usage limits – excessive requests may be rate-limited.
- Requires internet connection.
🧪 Technical Info #
- Translation Service: Google Translate (MIT’s service only works on scratch.mit.edu)
- Timeout: 10 seconds
- Supported Languages: 50+ languages with codes and names
- Caching: Prevents duplicate requests for same text + language pair
- Language Detection: Auto-detects from editor locale
- Manual Override: 🤖 “set language” block for custom source language
- Source-Target Pairing: Proper langpair (source|target) for accuracy
- Flexible Input: Accepts language codes (en, es) or names (English, Español)
- Numbers Optimization: Digits-only text bypasses translation
- Internet Required: Yes
- Usage Limits: Daily limits apply
🔗 Related Extensions #
- 🔊 Text to Speech – speak translated text out loud
- 🎤 Speech Recognition – recognize speech, then translate it
- 💬 ChatGPT – combine AI responses with translation
