English to Hindi transliteration

82 views
Skip to first unread message

neeraj shukla

unread,
May 30, 2017, 4:52:40 PM5/30/17
to Google AJAX APIs
I want to use the Google Transliteration API to have the English to Hindi transliteration on a personal website.

I am serving the website over HTTPS and when I follow the transliteration page, I am getting the API results returned via HTTP and hence the content is blocked by the browser.

Any chances of this getting fixed?

I am following the instructions here-


Code looks like this-

    <script type="text/javascript" src="https://www.google.com/jsapi">
    </script>
    <script type="text/javascript">
      // Load the Google Transliterate API
      google.load("elements", "1", {
            packages: "transliteration"
          });

      function onLoad() {
        var options = {
            sourceLanguage:
                google.elements.transliteration.LanguageCode.ENGLISH,
            destinationLanguage:
                [google.elements.transliteration.LanguageCode.HINDI],
            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 editable DIV with id
        // 'transliterateDiv'.
        control.makeTransliteratable(['hindicontent']);
      }
      google.setOnLoadCallback(onLoad);
    </script>


I am getting error because of this in the browser-


Since the request is being made via http and not https, its blocked. Is there something I can change to get this working?

Thanks in advance.
Regards



Reply all
Reply to author
Forward
0 new messages