Skip to content

A simple, fun translator that converts plain English into Star Trek's famous Vulcan language.

Notifications You must be signed in to change notification settings

bharati-21/vulcan-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VULCAN TRANSLATOR

A simple, fun translator that converts plain English into the Star Trek's famous Vulcan language.

This application translates English to the famous Star Trek's Vulcan lamguage using a translator API.

Live demo of the application: https://bharati-vulcan-translator.netlify.app/


PREREQUISITES

  • HTML
  • CSS
  • JavaScript
    • DOM Manipulation
    • APIs
    • Callbacks
    • Promises
    • Fetch API

WORKING

  1. User enters the text to be translated in a <textarea> field.
  2. When user clicks the "Translate" button, the event handler associated with button click is invoked.
  3. The event handler then retrieves the text from the <textarea>, and creates a fetch() request to the URL: https://api.funtranslations.com/translate/vulcan.json?text=userText, where userText is the to be translated.
  4. Once the translation is returned as a Response object, it is then converted to an object to retrieve the translation from the key contents.translated.
  5. The translation is displayed using a readonly <textarea>.

URL of the API

https://api.funtranslations.com/translate/vulcan.json?text=userText


My Learnings

  • Callbacks
  • Promises
  • Fetch API requests

Challenges

  • Handling errors from the API

About

A simple, fun translator that converts plain English into Star Trek's famous Vulcan language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published