Reverie API Documentation
  • Reverie APIs
  • Reference
    • Localization API
      • Setup
      • API Reference
      • Supported Languages
      • Supported Domains
      • API Messages
    • Transliteration API
      • Setup
      • API Reference
      • Language Codes
      • Supporting Domains
      • API Messages
    • Text to Speech API
      • Setup
      • API Reference
      • SSML (Speech Synthesis Markup Language)
      • Phoneme Reference
      • API Default Behaviour
      • Supporting Speaker Code
      • Supporting Sampling Rate
      • Supporting Audio Format
      • API Messages
    • Speech to Text | Streaming API
      • Setup
      • API Reference
      • Language Codes
      • Supporting Audio Format
      • Supporting Domains
      • API Messages
  • Speech to Text | File API
    • Setup
    • API Reference
    • Language Codes
    • Supporting Audio Format
    • API Messages
  • Speech to Text | Batch API
    • Setup
    • API Reference
    • Language Codes
    • Sample Request Responses
    • Supporting Audio Format
  • Language Identification API
    • Sample Code
    • API Reference
    • Language Codes
  • Reverie Products
    • Swalekh
    • Vachak
Powered by GitBook
On this page
  • Overview
  • Supporting Languages
  • Installation
  • Swalekh APIs
  • Change Language API
  • Change Mode API
  • Supported Modes
  • Language Codes
  1. Reverie Products

Swalekh

PreviousLanguage CodesNextVachak

Last updated 9 months ago

Overview

SwalekhWeb is a jQuery plugin that enables Indic typing text fields (<input/>, <textarea/>, <div contenteditable/>) on webpages. Currently supporting 22 Indian languages the plugin supports both Phonetic typing and Virtual keyboard as well.

Supporting Languages

Hindi

Assamese

Odia

Kannada

Bengali

Gujarati

Tamil

Malayalam

Punjabi

Marathi

Telugu

Urdu

Bodo

Dogri

Kashmiri

Konkani

Maithili

Manipuri

Nepali

Sanskrit

Santali

Sindhi

English

Installation

To install Swalekh web follow the steps -

  1. Include jQuery CDN v3.4 or above in your webpage.

  2. Include swalekh.js CDN (Provided by us) in your webpage.

  3. Initialize Swalekh using the following snippet.

$('.yourInputClass').indicInput({
apikey: 'YOUR-API_KEY',
appid: 'YOUR-APP_ID',
apiEndpoint: 'https://revapi.reverieinc.com/',
numSuggestions: 10,
mode: 'keyboard',
domain: 1
})
// You may initialize using either id or classnames

Note: Here, the ‘API Key’ and ‘App Id’ are provided by the Reverie team.

Swalekh APIs

Once your text fields are initialized, you may use the following APIs to change the language or typing modes.

Change Language API

$('.yourInputClass').trigger('change_lang', 'language code')

To capture the change_lang event an additional callback is also enabled for enhanced usage.

Find the appropriate language codes below.

$('.textbox').on('lang_changed', function(event, language) {
// `language` is the current language
})

Change Mode API

$('.yourInputClass').trigger('change_mode', 'phonetic')

Supported Modes

Swalekh Web supports the phonetic and native modes of typing.

To capture the change_mode event an additional callback is also enabled for enhanced usage.

$('.textbox').on('mode_changed', function(event, mode) {
// `mode` is the current mode
})

Language Codes

Language
Language Code

Hindi

hi

Assamese

as

Bengali

bn

Gujarati

gu

Kannada

kn

Malayalam

ml

Marathi

mr

Odia

or

Punjabi

pa

Tamil

ta

Telugu

te

English

en

Urdu

ur

Bodo

brx

Dogri

doi

Nepali

ne

Manipuri

mni

Maithili

mai

Sanskrit

sa

Sindhi

sd

Santali

sat

Kashmiri

ks