var pazpar2path = mkws_config.use_service_proxy ? service_proxy_url : pazpar2_url;
var usesessions = mkws_config.use_service_proxy ? false : true;
+var mkws_locale_lang = {
+ "de": {
+ "Authors": "Autoren",
+ "Subjects": "Schlagwörter",
+ "Sources": "Daten und Quellen",
+ "TERMLISTS": "Termlisten",
+ "Next": "Weiter",
+ "Prev": "Zurück",
+ "Search": "Suche",
+ "Sort by": "Sortieren nach",
+ "and show": "und zeige",
+ "per page": "pro Seite",
+ "Displaying": "Zeige",
+ "to": "von",
+ "of": "aus",
+ "found": "gefunden",
+
+ "dummy": "dummy"
+ },
+
+ "da": {
+ "Authors": "Forfattere",
+ "Subjects": "Emner",
+ "Sources": "Kilder",
+ "TERMLISTS": "Termlisten",
+ "Next": "Næste",
+ "Prev": "Forrige",
+ "Search": "Søg",
+ "Sort by": "Sorter efter",
+ "and show": "og show",
+ "per page": "per side",
+ "Displaying": "Visning",
+ "to": "til",
+ "of": "under",
+ "found": "fundet",
+
+ "dummy": "dummy"
+ }
+};
+
// create a parameters array and pass it to the pz2's constructor
// then register the form submit event with the pz2.search function
// autoInit is set to true on default
// move it out
var pager = document.getElementById("pager");
pager.innerHTML = "";
- pager.innerHTML +='<hr/><div style="float: right">Displaying: '
- + (data.start + 1) + ' to ' + (data.start + data.num) +
- ' of ' + data.merged + ' (found: '
+ pager.innerHTML +='<hr/><div style="float: right">' + M('Displaying') + ': '
+ + (data.start + 1) + ' ' + M('to') + ' ' + (data.start + data.num) +
+ ' ' + M('of') + ' ' + data.merged + ' (' + M('found') + ': '
+ data.total + ')</div>';
drawPager(pager);
// navi
function my_onterm(data) {
var termlists = [];
- termlists.push('<hr/><b>TERMLISTS:</b><hr/><div class="termtitle">Sources</div>');
+ termlists.push('<hr/><b>' + M('TERMLISTS') + ':</b><hr/><div class="termtitle">' + M('Sources') + '</div>');
for (var i = 0; i < data.xtargets.length && i < SourceMax; i++ ) {
termlists.push('<a href="#" target_id='+data.xtargets[i].id
+ ' onclick="limitTarget(this.getAttribute(\'target_id\'), this.firstChild.nodeValue);return false;">' + data.xtargets[i].name
+ ' </a><span> (' + data.xtargets[i].freq + ')</span><br/>');
}
- termlists.push('<hr/><div class="termtitle">Subjects</div>');
+ termlists.push('<hr/><div class="termtitle">' + M('Subjects') + '</div>');
for (var i = 0; i < data.subject.length && i < SubjectMax; i++ ) {
termlists.push('<a href="#" onclick="limitQuery(\'su\', this.firstChild.nodeValue);return false;">' + data.subject[i].name + '</a><span> ('
+ data.subject[i].freq + ')</span><br/>');
}
- termlists.push('<hr/><div class="termtitle">Authors</div>');
+ termlists.push('<hr/><div class="termtitle">' + M('Authors') + '</div>');
for (var i = 0; i < data.author.length && i < AuthorMax; i++ ) {
termlists.push('<a href="#" onclick="limitQuery(\'au\', this.firstChild.nodeValue);return false;">'
+ data.author[i].name
? firstClkbl + 2*onsides
: pages;
- var prev = '<span id="prev"><< Prev</span><b> | </b>';
+ var prev = '<span id="prev"><< ' + M('Prev') + '</span><b> | </b>';
if (curPage > 1)
prev = '<a href="#" id="prev" onclick="pagerPrev();">'
- +'<< Prev</a><b> | </b>';
+ +'<< ' + M('Prev') + '</a><b> | </b>';
var middle = '';
for(var i = firstClkbl; i <= lastClkbl; i++) {
+ numLabel + ' </a>';
}
- var next = '<b> | </b><span id="next">Next >></span>';
+ var next = '<b> | </b><span id="next">' + M('Next') + ' >></span>';
if (pages - curPage > 0)
next = '<b> | </b><a href="#" id="next" onclick="pagerNext()">'
- +'Next >></a>';
+ + M('Next') + ' >></a>';
var predots = '';
if (firstClkbl > 1)
$("#mkwsSearch").html('\
<form id="searchForm" name="search">\
<input id="query" type="text" size="50" />\
- <input id="button" type="submit" value="Search" />\
+ <input id="button" type="submit" value="' + M('Search') + '" />\
</form>');
$("#mkwsRecords").html('\
<td valign="top">\
<div id="ranking">\
<form name="select" id="select">\
- Sort by' + mkws_html_sort(config) + '\
- and show ' + mkws_html_perpage(config) + '\
- per page.\
+ ' + M('Sort by') + mkws_html_sort(config) + '\
+ ' + M('and show') + ' ' + mkws_html_perpage(config) + '\
+ ' + M('per page') + '.\
</form>\
</div>\
<div id="pager"></div>\
});
}
+/* locale */
+function M(word) {
+ var lang = mkws_config.lang;
+
+ if (!lang || !mkws_locale_lang[lang])
+ return word;
+
+ return mkws_locale_lang[lang][word] ? mkws_locale_lang[lang][word] : word;
+}
+
/* magic */
$(document).ready(function() { mkws_html_all(mkws_config) });