The website I want to add OpenSearchDescription to has a language parameter in the URL path to define the vistors language. This means that the search URL will be different for every language, e.g. http://www.example.org/en/search
and http://www.example.org/fr/search
The below snippet will allow to add a search URL, but for a specific language (e.g. English).
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<script/>
<ShortName>Example Site</ShortName>
<Description>Search Example Site</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://www.example.org/favicon.ico</Image>
<Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?output=firefox&q={searchTerms}" />
<Url type="text/html" method="GET" template="http://www.example.org/en/search?search_query={searchTerms}" />
</OpenSearchDescription>
The OSD documentation is not clear to me about adding multi language support. Could it be like this?
...
<Url type="text/html" method="GET" template="http://www.example.org/{language}/search?search_query={searchTerms}" />
<Language>en</Language>
<Language>fr</Language>
...