Discuss Scratch

HBALabs
Scratcher
100+ posts

New translate extension block — is (word) (English v)?

<is [Hello] (English v)? ::translate>

Detects if the phrase put in the Boolean is the language in the dropdown. Reports true or false.
This uses detected language feature that google translate has ( I think it uses their API )

If the detected language is the same as the language your translating to (Ex. English) then it will report true

* Putting gibberish in the block just reports false. Ex: “ejfeffw”

Last edited by HBALabs (Feb. 14, 2025 22:46:42)

AmpElectrecuted
Scratcher
1000+ posts

New translate extension block — is (word) (English v)?

what if multiple languages share the same word? E.g. “zero” is often shared between several languages
HBALabs
Scratcher
100+ posts

New translate extension block — is (word) (English v)?

AmpElectrecuted wrote:

what if multiple languages share the same word? E.g. “zero” is often shared between several languages

Well it depends what you put in the dropdown. Let’s say English and Spanish both share the same word pancakes, they both would report true since technically the word pancakes is Spanish and English (since they share the same word)

AvidOsirianGuy
Scratcher
100+ posts

New translate extension block — is (word) (English v)?

AmpElectrecuted wrote:

(#2)
what if multiple languages share the same word? E.g. “zero” is often shared between several languages
You have a point, there could be a word shared both by the German and English languages. You may never know that but it could even exist.
HBALabs
Scratcher
100+ posts

New translate extension block — is (word) (English v)?

AvidOsirianGuy wrote:

AmpElectrecuted wrote:

(#2)
what if multiple languages share the same word? E.g. “zero” is often shared between several languages
You have a point, there could be a word shared both by the German and English languages. You may never know that but it could even exist.

It depends on what google translate thinks:

HBATest wrote:

If the detected language is the same as the language your translating to (Ex. English) then it will report true

Powered by DjangoBB