Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Alien Language Translator with Enhanced Features #5000

Merged
merged 9 commits into from
Aug 1, 2024
37 changes: 37 additions & 0 deletions Games/Alien_Language_Translator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Hii 👋, My name is Wobbletron, the alien👽
---------------------------------------------------------------------------------------------------------------------------
Welcome to the Alien Language Translator project! This application allows users to translate text between human languages and fictional alien languages.
This is not just your humanly abba dabba jabba , rather its a whole vocabulary to learn my language.

## Features⭐
-Translation: Translate text between various human languages and alien languages.
-User-Friendly Interface: Simple and intuitive interface for easy translation.
-Customizable: Add new alien languages and translation rules.

## Usage
-Open the application in your browser.
-Select the translation of your choice
-Enter the text you want to translate in the input field.
-Click the "Translate" button to get the translated text.

## Contributing
We welcome contributions to improve the Alien Language Translator! If you'd like to contribute, please follow these steps:

-Fork the repository.
-Create a new branch (git checkout -b feature/YourFeature).
-Make your changes.
-Commit your changes (git commit -am 'Add new feature').
-Push to the branch (git push origin feature/YourFeature).
-Create a new Pull Request.

## Image of the game is placed in the image folder

👋ζ∑ζ∑φ¥Λß∈Ω , to understand this , please navigate to the game and learn my language

Happy Learning :)


## Contact
If you have any questions or suggestions, please feel free to reach out:
Email: [email protected]
GitHub: nikki-05
Binary file added Games/Alien_Language_Translator/images/alien.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Games/Alien_Language_Translator/indexes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alien Language Translator</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>Alien Language Translator 👽</h1>
<textarea id="inputText" placeholder="Enter text here..."></textarea>
<button id="translateButton">Translate</button>
<button id="switchButton">Switch to Alien Language</button>
<h2>Translated Text:</h2>
<p id="outputText"></p>
<button id="speakButton">Want to listen Me?</button>
</div>
<script src="scripts.js"></script>
</body>
</html>
93 changes: 93 additions & 0 deletions Games/Alien_Language_Translator/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
document.addEventListener('DOMContentLoaded', function() {
const inputText = document.getElementById('inputText');
const outputText = document.getElementById('outputText');
const translateButton = document.getElementById('translateButton');
const switchButton = document.getElementById('switchButton');
const speakButton = document.getElementById('speakButton');

let isAlienLanguage = false;

const englishToAlien = {
'a': '∆Ω', 'b': 'ßΛ', 'c': '¢Ψ', 'd': 'ↁΞ', 'e': '∑ζ', 'f': '∫Σ',
'g': 'ǤΠ', 'h': 'Ħχ', 'i': '¡λ', 'j': 'ʖκ', 'k': 'ЖΦ', 'l': '∫Φ',
'm': '₥α', 'n': '∩β', 'o': '⊕γ', 'p': '¶δ', 'q': '℺ε', 'r': '®μ',
's': '§θ', 't': '†ω', 'u': 'µτ', 'v': '√η', 'w': 'ψι', 'x': 'жς',
'y': '¥φ', 'z': '≀ν', ' ': ' '
};

const alienToEnglish = {
'∆Ω': 'a', 'ßΛ': 'b', '¢Ψ': 'c', 'ↁΞ': 'd', '∑ζ': 'e', '∫Σ': 'f',
'ǤΠ': 'g', 'Ħχ': 'h', '¡λ': 'i', 'ʖκ': 'j', 'ЖΦ': 'k', '∫Φ': 'l',
'₥α': 'm', '∩β': 'n', '⊕γ': 'o', '¶δ': 'p', '℺ε': 'q', '®μ': 'r',
'§θ': 's', '†ω': 't', 'µτ': 'u', '√η': 'v', 'ψι': 'w', 'жς': 'x',
'¥φ': 'y', '≀ν': 'z', ' ': ' '
};

function translateToAlien(text) {
return text.split('').map(char => {
if (englishToAlien[char.toLowerCase()]) {
return englishToAlien[char.toLowerCase()];
} else {
return char;
}
}).join('').split('').reverse().join('') + '∈Ω';
}

function translateToEnglish(text) {
text = text.replace('∈Ω', '');
text = text.split('').reverse().join('');
return text.match(/.{1,2}/g).map(pair => {
if (alienToEnglish[pair]) {
return alienToEnglish[pair];
} else {
return pair;
}
}).join('');
}

function alienifySpeech(text) {
// Adding more alien-like effects
// Randomly adding symbols and repetition to simulate alien speech
let alienText = text.split('').map(char => {
if (char === ' ') return ' '; // Extra space for effect
// Repeating characters and adding symbols
return char + '✪' + char + '✾';
}).join(' ') + ' ΨΩ';

// Add additional random characters and distortions
return alienText.split('').map((char, index) => {
// Insert random symbols at odd positions
if (index % 4 === 0 && Math.random() > 0.5) {
return char + '✵';
}
return char;
}).join('');
}

function speakText(text) {
const utterance = new SpeechSynthesisUtterance(alienifySpeech(text));
utterance.pitch = 3.0; // Very high pitch for an unusual effect
utterance.rate = 9.0; // Slow rate to exaggerate alien effect
utterance.volume = 0.7; // Slightly higher volume
speechSynthesis.speak(utterance);
}

translateButton.addEventListener('click', function() {
const text = inputText.value;
if (isAlienLanguage) {
outputText.textContent = translateToEnglish(text);
} else {
outputText.textContent = translateToAlien(text);
}
});

switchButton.addEventListener('click', function() {
isAlienLanguage = !isAlienLanguage;
switchButton.textContent = isAlienLanguage ? 'Switch to English' : 'Switch to Alien Language';
});

speakButton.addEventListener('click', function() {
const text = outputText.textContent;
speakText(text);
});
});
99 changes: 99 additions & 0 deletions Games/Alien_Language_Translator/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
body {
font-family: 'Arial', sans-serif;
background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
color: #ffffff;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
}

.container {
background: rgba(255, 255, 255, 0.1);
padding: 20px 40px;
border-radius: 15px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
max-width: 600px;
width: 100%;
text-align: center;
backdrop-filter: blur(10px);
}

h1 {
margin-bottom: 20px;
font-size: 2.5em;
font-weight: 700;
color: #ffffff;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.alien-img {
width: 100px;
height: auto;
margin-bottom: 20px;
}

textarea {
width: 100%;
height: 120px;
margin-bottom: 20px;
padding: 10px;
border: none;
border-radius: 8px;
background: rgba(255, 255, 255, 0.2);
color: #ffffff;
font-size: 1.2em;
resize: none;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
transition: background 0.3s ease;
}

textarea::placeholder {
color: #d3d3d3;
}

textarea:focus {
outline: none;
background: rgba(255, 255, 255, 0.3);
}

button {
margin: 10px;
padding: 12px 20px;
border: none;
border-radius: 8px;
cursor: pointer;
background: #4e4376;
color: #ffffff;
font-size: 1.2em;
transition: background 0.3s ease, transform 0.3s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

button:hover {
background: #6b4b88;
transform: translateY(-3px);
}

h2 {
margin-top: 30px;
font-size: 2em;
font-weight: 700;
color: #ffffff;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#outputText {
margin-top: 20px;
padding: 10px;
border: none;
border-radius: 8px;
background: rgba(255, 255, 255, 0.2);
color: #ffffff;
font-size: 1.2em;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
min-height: 50px;
}
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ This repository also provides one such platforms where contributers come over an
<!-- list of the games -->
<center>

</center>

| Game | Game | Game | Game | Game |

| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | --- |


| [Master Typing](https://github.com/kunjgit/GameZone/tree/main/Games/Master_Typing) | [Treasure Hunt](https://github.com/Antiquely3059/GameZone/tree/main/Games/Treasure%20Hunt) | [Virtual Pet](https://github.com/Antiquely3059/GameZone/tree/main/Games/Virtual_Pet) | [MazeRunner](https://github.com/kunjgit/GameZone/tree/main/Games/MazeRunner) | [Ping_Pong_Singleplayer](https://github.com/kunjgit/GameZone/tree/main/Games/Ping_Pong_Singleplayer) | [Madlibs](https://github.com/AaryanManghnani/GameZone/tree/main/Games/Madlibs) |
Expand Down Expand Up @@ -411,7 +413,7 @@ Terms and conditions for use, reproduction and distribution are under the [Apach
<a href="https://github.com/kunjgit/GameZone/graphs/contributors">
<img src="https://contrib.rocks/image?repo=kunjgit/GameZone" />
</a>
=======

| [Maze_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Maze_Game) | [Coloron](https://github.com/kunjgit/GameZone/tree/main/Games/Coloron). | [Black_jackk](https://github.com/kunjgit/GameZone/tree/main/Games/Black_jackk) | [Emoji_Intruder](https://github.com/kunjgit/GameZone/tree/main/Games/Emoji_Intruder) | [Guess The Weapon](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_The_Weapon) | [Guess Who](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_Who) | | | [Guess Who](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_Who) | [Pop My Balloon](https://github.com/kunjgit/GameZone/tree/main/Games/Pop_My_Balloon) | [Earth_Guardian](https://github.com/kunjgit/GameZone/tree/main/Games/Earth_Guardian) | [HTML5_Controller_Tester](https://github.com/kunjgit/GameZone/tree/main/Games/HTML5_Controller_Tester)
| [escaperoom](https://github.com/kunjgit/GameZone/tree/main/Games/escaperoom) | [Ball_Shooting_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Ball_Shooting_Game) | [HTML5_Controller_Tester](https://github.com/kunjgit/GameZone/tree/main/Games/HTML5_Controller_Tester) | [Tower Stack](https://github.com/kunjgit/GameZone/tree/main/Games/Tower_Stack) |[Maze_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Maze_Game) | [TriHand_Tactics](https://github.com/kunjgit/GameZone/tree/main/Games/TriHand_Tactics) | [Earth_Guardian](https://github.com/kunjgit/GameZone/tree/main/Games/Earth_Guardian) | [Ball_Shooting_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Ball_Shooting_Game) |
[CatchTheBall](https://github.com/kunjgit/GameZone/tree/main/Games/CatchTheBall) | [DoraemonRun ](https://github.com/kunjgit/GameZone/tree/main/Games/DoraemonRun) | [Memory_Cards_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Memory_Cards_Game) | [Technical_Mind_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Technical_Mind_Game) | [Slide_Master_Puzzle](https://github.com/kunjgit/GameZone/tree/Main/Games/Slide_Master_Puzz)|
Expand All @@ -428,7 +430,6 @@ Terms and conditions for use, reproduction and distribution are under the [Apach
| [Dragon_Tower](https://github.com/kunjgit/GameZone/tree/main/Games/Dragon_Tower) | [Hover_Board_Effect](https://github.com/kunjgit/GameZone/tree/main/Games/Hover_Board_Effect) | [escaperoom](https://github.com/kunjgit/GameZone/tree/main/Games/escaperoom) | [Ball_Shooting_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Ball_Shooting_Game) | [HTML5_Controller_Tester](https://github.com/kunjgit/GameZone/tree/main/Games/HTML5_Controller_Tester) | [candy_match](https://github.com/kunjgit/GameZone/tree/main/Games/Candy_Match_Saga) | [Crossy_Road](https://github.com/tanujbordikar/GameZone/tree/Crossy_Road) | [HueHero](https://github.com/kunjgit/GameZone/tree/main/Games/HueHero) | [Puzzel_Winner](https://github.com/kunjgit/GameZone/tree/main/Games/Puzzel_Winner) |
| [Emoji_Intruder](https://github.com/kunjgit/GameZone/tree/main/Games/Emoji_Intruder) | [Guess The Weapon](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_The_Weapon) | [TriHand_Tactics](https://github.com/kunjgit/GameZone/tree/main/Games/TriHand_Tactics) | [Earth_Guardian](https://github.com/kunjgit/GameZone/tree/main/Games/Earth_Guardian) | [CatchTheBall](https://github.com/kunjgit/GameZone/tree/main/Games/CatchTheBall) |
| [Candy_Crush_Saga](https://github.com/kunjgit/GameZone/tree/main/Games/Candy_Crush_Saga) | [numeral-whiz](https://github.com/Ishan-77/GameZone/tree/main/Games/numeral-whiz) | [candy_match](https://github.com/kunjgit/GameZone/tree/main/Games/Candy_Match_Saga) | [Crossy_Road](https://github.com/tanujbordikar/GameZone/tree/Crossy_Road) | [HueHero](https://github.com/kunjgit/GameZone/tree/main/Games/HueHero) | [Puzzel_Winner](https://github.com/kunjgit/GameZone/tree/main/Games/Puzzel_Winner) |
| [Emoji_Intruder](https://github.com/kunjgit/GameZone/tree/main/Games/Emoji_Intruder) | [Guess The Weapon](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_The_Weapon) | [Guess Who](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_Who) | [Pop My Balloon](https://github.com/kunjgit/GameZone/tree/main/Games/Pop_My_Balloon) | [Tower Stack](https://github.com/kunjgit/GameZone/tree/main/Games/Tower_Stack) |

| [DNA_Sequencer](https://github.com/kunjgit/GameZone/tree/main/Games/DNA_Sequencer) |
| [Boom_Blast](https://github.com/kunjgit/GameZone/tree/main/Games/Boom_Blast) |
Expand Down Expand Up @@ -519,7 +520,6 @@ This repository also provides one such platforms where contributers come over an
- ex .`[New game]: Super Mario`

- Make sure you select the program in which you are participating 🔥
=======
| Game | Game | Game | Game | Game |


Expand All @@ -545,12 +545,11 @@ This repository also provides one such platforms where contributers come over an
<h2><font size="6"><img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Robot.png" alt="Robot" width="40" height="40" /> Games</font></h2>
</div>
<!-- list of the games -->
<center>

</center>

| Game | Game | Game | Game | Game |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | --- |

| [Master Typing](https://github.com/kunjgit/GameZone/tree/main/Games/Master_Typing) | [Treasure Hunt](https://github.com/Antiquely3059/GameZone/tree/main/Games/Treasure%20Hunt) | [Virtual Pet](https://github.com/Antiquely3059/GameZone/tree/main/Games/Virtual_Pet) | [MazeRunner](https://github.com/kunjgit/GameZone/tree/main/Games/MazeRunner) | [Ping_Pong_Singleplayer](https://github.com/kunjgit/GameZone/tree/main/Games/Ping_Pong_Singleplayer) | |
| [Tilting Maze](https://github.com/kunjgit/GameZone/tree/main/Games/Tilting_Maze) | [Simon Game Challenge](https://github.com/kunjgit/GameZone/tree/main/Games/Simon_Game_Challenge) | [Snake Game](https://github.com/kunjgit/GameZone/tree/main/Games/Snake_Game) | [Dino Runner Game](https://github.com/kunjgit/GameZone/tree/main/Games/Dino_Runner_Game) |
| [Whack a Mole](https://github.com/kunjgit/GameZone/tree/main/Games/Whack_a_Mole) | [Doraemon Jump](https://github.com/kunjgit/GameZone/tree/main/Games/Doraemon_Jump) | [Black Jack](https://github.com/kunjgit/GameZone/tree/main/Games/Black_Jack) | [Memory Game](https://github.com/kunjgit/GameZone/tree/main/Games/Memory_Game) | [Word Guessing Game](https://github.com/kunjgit/GameZone/tree/main/Games/Word_Guessing_Game) |
Expand Down
Binary file added assets/images/Alien_Language_Translator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading