Tools: Scratch | Source Code: GitHub
TranslateCards is a language-learning game designed to help users memorize vocabulary by creating personalized flashcards. Players input a word in their native language along with its translation in the target language they’re learning. Once the words are added, the app generates flashcards displaying the original word on one side and its translation on the other. This approach encourages active recall and reinforces language learning in a simple, effective way. The game also provides an immersive experience, allowing users to practice at their own pace.
In addition to the basic flashcard functionality, TranslateCards includes useful features like the FilterLanguage and Favorite methods. With FilterLanguage, users can organize their flashcards by language, making it easy to focus on specific languages they are learning. The Favorite method allows users to mark important or difficult words for quick access, ensuring they can revisit challenging vocabulary more frequently. These features make the game highly customizable and effective for learners at any level, whether they’re beginners or advanced language enthusiasts.
When the text input button is pressed, the program will wait for the text to be inputted. The text will detect this by checking whether the value of empty text, a variable which was the same as the text variable when the program started, is the same as the text variable. If it’s not, it will start. The program will select some of the words according to the specified words, language filter, and favorite words, then it will display the words and their translated versions. Finally, it will set the value of the empty text variable to the value of the text variable so that the program doesn’t keep activating over and over.
When the + sprite is clicked, the program will ask for our main word, its translation and the target language of our translation. Another function inside the add function is that, when the timer starts it will check for the number of the backdrop that the program has to prevent any bugs that can be caused from old selections in our program. So, if the backdrop is number 2, it will set the values for the show/hide variables and show all of the lists. On the opposite condition it will just do the opposite.
When the “Language Filter” button is clicked, the program will look whether there are any languages already inputted in the program. If there are none, it will skip the whole process and do nothing. If there is at least 1 language, the program will ask which language we want to add. The LanguageFilterChecker variable will then help us check whether the word exists in the language list. The LanguageFilterChecker’s value will start from 1 and will go higher until it’s higher than the number of the words in the language list. The program will compare the answer to a specific language in the language list, which will be determined by the value of LanguageFilterChecker. If the language input already exists in the language list, it won't add the word to the filtered languages list. If there is no such language in the filter, it will add it to the filter.
When the timer starts our program will check whether the backdrop is 1 or 2 and if it's 2 then it will hide our function from the screen and else it will show and this will be inside a forever loop, making sure that it will work until the program has finished. After this, we will create a show/hide variable and set it as 0 so that there won't be anything on the screen when the program starts. And, when this sprite is clicked we will first check the value of the show/hide variable and if its zero then it will go to another loop which again checks for show/hide value and shows the main word and translated word list and after that this will go back to our main program making show/hide value 1. Also if we do the reverse, it will just do the opposite thing of what the program has done before.
First we are going to create a word count variable so that we can check whether we created a word for our mainWords or not to prevent favoriting a word even if we don't have a word in our main list. And, we will set this value to 0. And then we will create a timer loop which will make our program start after time is zero and inside that we will add an if condition to make our favorite function appear in backdrop number 2. After the sprite is clicked we will again create an if condition to check if the word counter is higher than 0 to make sure that there are words in the main word list. And then we will create a favorite checker variable to ensure that the same word is not present in the favorite list twice or more and it will also check if there is a word inside the favorite list that is not on the main list. And to make sure that these conditions work we will again create a loop that will check for the times that the same word is repeated twice and the favorite list does not contain an unrelated word.
This function will just change the backdrops from one to two or the opposite by just checking the value of the backdrop. For instance, if the backdrop number is 1 then it will switch the backdrop to 2 or just do the opposite if the condition is opposite.
This function will just delete every single thing in all of the lists after it is clicked.