Configure a Website on the Global Delivery Network

Integrating Embedded Search

If your site has search functionality, allowing end-users to search your site using in-language keywords is important for providing a cohesive in-language experience. 3rd party search engine services will work on translated sites without altering your code. Embedded search features can be integrated with Smartling using specific html classes.

This article covers how to setup your search tool with the Global Delivery Network (GDN).

3rd Party Search Engine Services

For 3rd party search engines, all you need to do is update your settings to add your translated domains as well as your original site.

  1. Go to your search engine’s service dashboard.
  2. Add your translated domains to your list of sites. E.g. ru.mysite.com.

No changes to your source code are required to integrate 3rd party search engine services.

Embedded Search

Smartling's embedded search feature works by machine translating an in-language search term to English, and then searching for the translated English term against your content. Once the content is returned, it is then translated back to the language of the original search via the GDN.

For example, a Spanish user may search for the term 'Zapatos' on your Spanish website. After integrating with Smartling's embedded search feature, Smartling would machine translate 'Zapatos' to English ('Shoes'), and pass this search query to your source site. Your source site would return relevant results matching 'Shoes', which Smartling would translate like other content on your localized website.

Your embedded search tool must meet two requirements to be compatible with our tool:

  1. Search requests are sent via a GET request
  2. Search term must be passed as a URL parameter. For example: www.mysite.com/?s=searchterm

If you meet these requirements, you'll need to implement the following markup in your source code:

  1. Add the class sl-search-input to any <input> element used for searching.
  2. Add the class sl-search-keyword added to any search term on the results page.
<form accept-charset="UTF-8" action="/hc/en-us/search" method="get" role="search">
  <input id="query" class="sl-search-input" placeholder="Search" type="search" />
</form>

<span class="sl-search-keyword">SearchTerm</span> (1 - 192 of 579 results)</span>

Once you've implemented the markup above, notify your Customer Success Manager to complete implementation of embedded search.

If you are unsure if your search is compatible with Smartling's embedded search feature, contact support@smartling.com.

Was this article helpful?