Skip to content

Dhakshan-Rajkumar/englishtranslator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

// Load the Google Transliteration API google.load("elements", "1", { packages: "transliteration" });

  function onLoad() {
    var options = {
      sourceLanguage: 'en', // or google.elements.transliteration.LanguageCode.ENGLISH,
      destinationLanguage: ['ta'], 
      shortcutKey: 'ctrl+g',
      transliterationEnabled: true
    };
    // Create an instance on TransliterationControl with the required
    // options.
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textfields with the given ids.
    var ids = ["Tamil"];
    control.makeTransliteratable(ids);

    // Show the transliteration control which can be used to toggle between
    // English and Hindi.

    // control.showControl('translControl');
    var options = {
        sourceLanguage: 'en', // or google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage: ['hi'],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textfields with the given ids.
    var ids = ["Hindi"];
    control.makeTransliteratable(ids);

    var options = {
        sourceLanguage: 'en', // or google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage: ['kn'],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textfields with the given ids.
    var ids = ["Kannada"];
    control.makeTransliteratable(ids);


    var options = {
        sourceLanguage: 'en', // or google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage: ['mr'],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };
    // Create an instance on TransliterationControl with the required
    // options.
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textfields with the given ids.
    var ids = ["MARATHI"];
    control.makeTransliteratable(ids);


    var options = {
        sourceLanguage: 'en', // or google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage: ['ml'],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };
    // Create an instance on TransliterationControl with the required
    // options.
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textfields with the given ids.
    var ids = ["MALAYALAM"];
    control.makeTransliteratable(ids);

    var options = {
        sourceLanguage: 'en', // or google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage: ['gu'],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };
    // Create an instance on TransliterationControl with the required
    // options.
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textfields with the given ids.
    var ids = ["GUJARATI"];
    control.makeTransliteratable(ids);


    var options = {
        sourceLanguage: 'en', // or google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage: ['te'],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };
    // Create an instance on TransliterationControl with the required
    // options.
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textfields with the given ids.
    var ids = ["TELUGU"];
    control.makeTransliteratable(ids);


        }google.setOnLoadCallback(onLoad);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published