Keyboard Layout Converter


Access to the service via the API

To access the service «Keyboard Layout Converter» via the API, you should send a AJAX-request (type: POST) to the address https://corpus.by/KeyboardLayoutConverter/api.php. With an input array data the following parameters are passed:

  • text — arbitrary input text.
  • inp — keyboard layout according to which the text is printed:
    • be — Belarusian keyboard layout;
    • en — English keyboard layout;
    • ru — Russian keyboard layout.
  • outp — keyboard layout to which you want to convert the text:
    • be — Belarusian keyboard layout;
    • en — English keyboard layout;
    • ru — Russian keyboard layout.

Example of AJAX-request:

$.ajax({
   type: “POST”,
   url: “https://corpus.by/KeyboardLayoutConverter/api.php”,
   data:{
      “text”: “Ckjdf/”,
      “inp”: “en”,
      “outp”: “be”
   },
   success: function(msg){ },
   error: function() { }
});

The server returns a JSON-array with the following parameters:

  • text — input text.
  • result — resulting converted text.

For example, the following reply will be formed on the above listed AJAX-request:

[
   {
      “text”: “Ckjdf/”,
      “result”: “Слова.”
   }

]

 

Калі Вы знайшлі ў тэксце памылку правапісу, калі ласка, выдзеліце гэты тэкст і націсніце Ctrl+Enter.