![]() ![]() listener provides a listener function for the event.This argument takes its value from the eventType enum (such as. eventType is the event for which the listener is to be added.The contents of the event object depend on the type of the event. When the particular event type is triggered, the listener is called with the event object. addEventListener(eventType, listener, opt_listenerScope) adds a listener to the transliteration control for the specified event type. addEventListener(eventType, listener, opt_listenerScope) The following methods are implemented on the namespace. Create an instance on TransliterationControl with the required The following code snippet demonstrates how to create an instance of the transliteration control: Unsupported languages in the sourceLangauge and destinationLanguage language pair Invalid sourceLanguage or destinationLanguage This method creates exceptions in the following circumstances: Note: You cannot use Shift as the only modifier however, you can use it in combination with Alt or Control. For example, 'Ctrl+g' and 'Ctrl+Shift+a' are both valid shortcut key combinations. ![]() To specify the shortcut key, specify a string containing modifiers such as 'Ctrl', 'Alt' or 'Shift' along with an alphabetic letter. shortcutKey is an optional string field that specifies a shortcut key to toggle transliteration on or off.If you wish to enable transliteration by default, specify this field with a value of true. transliterationEnabled is an optional field specifying whether to enable transliteration by default.Please refer to getDestinationLanguages for more details regarding valid destination languages for a given source language. In the UI, the available destination languages appear in the menu, with the first language in the array selected by default. destinationLanguage is a mandatory array that specifies the destination language using the LanguageCode enum as in (as in.Currently, English is the only supported source language. sourceLanguage is a mandatory string that specifies the source language using the LanguageCode enum (as in.The options argument can have the following fields: TransliterationControl(options) enables transliteration on a set of editable HTML DOM elements and supplies a number of methods allowing you to control transliteration in those elements. The following constructor and methods allow you to perform transliteration within a UI provided by the API. ![]() Transliteration control JavaScript reference These properties are below.Īn array of maximum size 5, with transliterations for the corresponding word in wordsArray. For each result, it's as if the system called new Object() and then set formal properties on that object. All that it means is that there is no named constructor. While there is no formal implementation of the objects, they exist, and we document them as if there was a backing JavaScript implementation. Consequently, we have chosen not to implement formal JavaScript objects, and instead dynamically created the result objects from their serialized form. Result objects are produced using a JSON encoding of server requests. This simplified method for transliteration uses the namespace (and not, which is the namespace for every other method in the Transliterate API).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |