Skip to content

Commit

Permalink
Merge pull request #158 from daisy/localize/search
Browse files Browse the repository at this point in the history
Localize searching
  • Loading branch information
mattgarrish authored Jan 14, 2025
2 parents 1f5d151 + 2fd92ce commit 81ac5e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ KB.prototype.generateHeader = function () {

var search_box = document.createElement('div');
search_box.setAttribute('class', 'gcse-searchbox-only');
search_box.setAttribute('data-lr', 'lang_' + this.lang);
search_box.setAttribute('data-gl', 'lang_' + this.lang);

if (this.lang !== 'en') {
search_box.setAttribute('data-resultsUrl', '/publishing/' + this.lang + '/search/');
}

search.appendChild(search_box);
header.appendChild(search);
Expand Down

0 comments on commit 81ac5e5

Please sign in to comment.