mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
User language control via userlang query param
This is a draft commit enabling the testing of the support for kiwix-serve internationalization.
This commit is contained in:
committed by
Matthieu Gautier
parent
507e111f34
commit
e4a0a029ff
@ -12,9 +12,10 @@ jq(document).ready(() => {
|
||||
? (new URLSearchParams(window.location.search)).get('content')
|
||||
: window.location.pathname.split(`${root}/`)[1].split('/')[0];
|
||||
|
||||
const userlang = (new URLSearchParams(window.location.search)).get('userlang') || "en";
|
||||
$( "#kiwixsearchbox" ).autocomplete({
|
||||
|
||||
source: `${root}/suggest?content=${bookName}`,
|
||||
source: `${root}/suggest?content=${bookName}&userlang=${userlang}`,
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
|
||||
|
Reference in New Issue
Block a user