Add language to inventaire search book

This commit is contained in:
2026-01-22 13:37:42 +01:00
parent 8d3569e5d6
commit 7921a83f30
6 changed files with 33 additions and 9 deletions

View File

@@ -30,7 +30,8 @@
function fetchData(searchTerm, authorId) {
if (searchTerm != null) {
getSearchBooks(data, error, searchTerm, limit, offset.value);
let lang = navigator.language.substring(0,2);
getSearchBooks(data, error, searchTerm, lang, limit, offset.value);
getCountSearchBooks(totalBooksData, errorFetchTotal, searchTerm);
} else if (authorId != null) {
getAuthorBooks(data, error, authorId, limit, offset.value);