From 2fd92cea15f7fcd87b188e48c267a98ca7ff94ab Mon Sep 17 00:00:00 2001 From: Matt Garrish Date: Tue, 14 Jan 2025 15:06:16 -0500 Subject: [PATCH] add configuration options for japanese searches --- js/init.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/init.js b/js/init.js index 7a8c24e8..f9c4d73d 100644 --- a/js/init.js +++ b/js/init.js @@ -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);