Name Description Size
BingTranslator.jsm Translates a webpage using Bing's Translation API. @param translationDocument The TranslationDocument object that represents the webpage to be translated @param sourceLanguage The source language of the document @param targetLanguage The target language for the translation @returns {Promise} A promise that will resolve when the translation task is finished. 15174
cld2 8
content 5
GoogleTranslator.jsm Translates a webpage using Google's Translation API. @param translationDocument The TranslationDocument object that represents the webpage to be translated @param sourceLanguage The source language of the document @param targetLanguage The target language for the translation @returns {Promise} A promise that will resolve when the translation task is finished. 10302
LanguageDetector.jsm Detect the language of a given string. The argument may be either a string containing the text to analyze, or an object with the following properties: - 'text' The text to analyze. - 'isHTML' (optional) A boolean, indicating whether the text should be analyzed as HTML rather than plain text. - 'language' (optional) A string indicating the expected language. For text extracted from HTTP documents, this is expected to come from the Content-Language header. - 'tld' (optional) A string indicating the top-level domain of the document the text was extracted from. - 'encoding' (optional) A string describing the encoding of the document the string was extracted from. Note that, regardless of the value of this property, the 'text' property must be a UTF-16 JavaScript string. @returns {Promise<Object>} @resolves When detection is finished, with a object containing these fields: - 'language' (string with a language code) - 'confident' (boolean) Whether the detector is confident of the result. - 'languages' (array) An array of up to three elements, containing the most prevalent languages detected. It contains a 'languageCode' property, containing the ISO language code of the language, and a 'percent' property, describing the approximate percentage of the input which is in that language. For text of an unknown language, the result may contain an entry with the languge code 'un', indicating the percent of the text which is unknown. 5040
moz.build 703
test 11
Translation.jsm The list of translation engines and their attributions. 14652
TranslationContentHandler.jsm nsIWebProgressListener implementation 5815
TranslationDocument.jsm This class represents a document that is being translated, and it is responsible for parsing the document, generating the data structures translation (the list of translation items and roots), and managing the original and translated texts on the translation items. @param document The document to be translated 23215
YandexTranslator.jsm Translates a webpage using Yandex's Translation API. @param translationDocument The TranslationDocument object that represents the webpage to be translated @param sourceLanguage The source language of the document @param targetLanguage The target language for the translation @returns {Promise} A promise that will resolve when the translation task is finished. 11912