Dictionary

Size
2,604 Kb
Views
38,456

How do I make an dictionary?

Yandex api translate used. What is a dictionary? How do you make a dictionary? This script and codes were developed by Nikita Zubarets on 12 September 2022, Monday.

Dictionary Previews

Dictionary - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Dictionary </title> <link rel='stylesheet prefetch' href='http://www.monogon.co/assets/lib/bootstrap/3/css/bootstrap.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class='container'> <h1>Translater</h1> <form class='form-horizontal well' id='translate'> <div class='control-group'> <div class='controls'> <input name='word' type='text'> </div> </div> <hr> <div class='control-group'> <div class='controls'> <input class='btn btn-primary' type='submit' value='Do it!'> </div> </div> <div class='control-group result'> <div class='controls'> <hr> <div id='result'></div> </div> </div> </form>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Dictionary - Script Codes CSS Codes

.result { display: none;
}

Dictionary - Script Codes JS Codes

var Dictionary = { args: { api: "trnsl.1.1.20130912T122526Z.7dd52df9f1d3ea78.af10c3fb85e0fe32f754e918d281cf48977c83f7;", lang: "en-ru", wrapper: $(".result"), }, url: function(text) { return "https://translate.yandex.net/api/v1.5/tr.json/translate?key="+this.args.api+"&lang="+this.args.lang+"&text="+text.replace(/ /g, "+"); }, getTranslate: function(text) { $.get(this.url(text), function(data) { Dictionary.setResponse(data) }); }, setResponse: function(response) { console.log(response); var str = ""; for(var i=0; i<response.text.length; i++) { str += response.text[i]; } $("#result").text(str); this.args.wrapper.show(); }
};
$(function() { $("#translate").on("submit", function(e) { e.preventDefault(); var word = $(this).find("[name=word]").val(); Dictionary.getTranslate(word); });
});
Dictionary - Script Codes
Dictionary - Script Codes
Home Page Home
Developer Nikita Zubarets
Username snapson
Uploaded September 12, 2022
Rating 3
Size 2,604 Kb
Views 38,456
Do you need developer help for Dictionary?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Nikita Zubarets (snapson) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!