ଉଇକିପିଡ଼ିଆ:ଟୁଲ/ଅନୁବାଦକ
ଦେଖଣା
ଆଲ୍ଫା ସଂସ୍କରଣ
<script>function translate() { if (document.getElementById('input_text').value == "") { alert('କିଛି ଲେଖା ନାହିଁ ।') } else { var source_text = $('#input_text').val(); $.ajax({ url: "https://translate.wmcloud.org/api/translate/en/ory", type: "POST", dataType: "json", contentType: "application/json; charset=utf-8", data: JSON.stringify({ text: source_text }), success: function (result) { // when call is sucessfull $('#output_text').val(result.translation); }, error: function (err) { // check the err for error details } }); } }; </script> <script> $("#translate_button").on("click", function() {
translate();
}); </script>
<textarea class="input" placeholder="ଏଠାରେ ଇଁରାଜୀ ଲେଖା ପେଷ୍ଟ କରନ୍ତୁ ।" id="input_text" style="float:left"></textarea>
<button id="translate_button" onClick="translate">Translate</button>
<textarea class="input" placeholder="ଓଡ଼ିଆ ଲେଖା ଏଇଠି ଆସିବ ।" id="output_text" style="float:left"></textarea>