Search engines are normally declared using Web Search section in → , XMLmind XML Editor - Online Help.
Alternatively, search engines may be declared in system property WebSearch.services. System property WebSearch.services must contain search_engine_name
/search_engine_URL
pairs separated by newline characters. Open lines are ignored.
When search engines have been declared in both the user preferences (that is, using the Preferences dialog box) and system property WebSearch.services, those declared in the user preferences supersede those declared in the system property.
When this system property is missing, this is equivalent to having the following property
configuration element in your customize.xxe
file:
<property name="WebSearch.services"><![CDATA[ Google https://www.google.com/search?q=${searched}&hl=${locale2}&lr=lang_${lang2} Google (phrase) https://www.google.com/search?as_epq=${searched}&hl=${locale2}&lr=lang_${lang2} Wikipedia https://${lang2}.wikipedia.org/w/index.php?title=Special%3ASearch&search=${searched}&fulltext=Search TheFreeDictionary https://${lang2}.thefreedictionary.com/${searched} Wiktionary https://${lang2}.wiktionary.org/wiki/${searched} Google Translate https://translate.google.com/?q=${searched}&sl=${lang2}&tl=fr ]]></property>
The above URI translates some text to French ( |
The following variables are substituted in search_engine_URL
:
Variable | Description |
---|---|
${searched} | Searched text. |
${locale} | The language of the user interface (GUI) of XXE. |
${locale2} | Same as ${locale} , but just the first two ISO 639-1 letter codes. Example: if ${locale} is fr-CA , then ${locale2} is fr . |
${lang} | The language of searched text. This language is automatically determined as follows:
|
${lang2} | Same as ${lang} , but just the first two ISO 639-1 letter codes. |
The value of a variable is automatically escaped if needed too. For example, "vin rosé
" becomes "vin%20ros%C3%A9
".