When searching within the Web Widget (Classic), why do results return articles in another language?

Why do Web Widget (Classic) search results return articles in another language?

When you search for articles in the Web Widget (Classic), you see results in a different language. For example, the Web Widget (Classic) is in English but the returned articles are in French.

Why this happens

The search in the Web Widget (Classic) first looks for articles in its current locale. If no results exist, it looks for articles that do not have a translation in that locale.

For instance, you are on a page with an English Web Widget (Classic) and you search for the word "Finance". Two French articles return in the results. This occurs because:

The Web Widget (Classic) looks for the word "Finance" in all English articles of the associated help center.

Because no results exist, the Web Widget (Classic) looks for articles that do not have an English translation. It checks all available translations in those articles.

Two articles that have a French translation, but not an English translation, match the search query.

The Web Widget (Classic) returns the two articles in French.

Resolution steps

To resolve this, translate articles into all enabled languages of the help center. In the example above, the search does not return the French articles if they have an English translation. If this is not possible, filter the search results to a specific category, section, or label. Use the filter setting in the Web Widget (Classic) API.