diff --git a/add/data/xql/getMeasures.xql b/add/data/xql/getMeasures.xql
index 1d49b5f2a..f349fd9d8 100644
--- a/add/data/xql/getMeasures.xql
+++ b/add/data/xql/getMeasures.xql
@@ -30,9 +30,9 @@ import module namespace console="http://exist-db.org/xquery/console";
declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
-declare function local:getMeasures($mei as node(), $mdivID as xs:string) as xs:string* {
+declare function local:getMeasures($mei as node(), $mdivID as xs:string, $lang as xs:string) as xs:string* {
- let $disclaimer := $mei//mei:pubStmt//mei:useRestrict[@type = 'disclaimer']/string() => replace('\n', '
')
+ let $disclaimer := $mei//mei:pubStmt//mei:useRestrict[@type = 'disclaimer'][if (./@xml:lang) then (./@xml:lang = $lang) else (.)]/string() => replace('\n', '
')
return if($mei//mei:parts)
then(
@@ -110,8 +110,9 @@ declare function local:getMeasures($mei as node(), $mdivID as xs:string) as xs:s
let $uri := request:get-parameter('uri', '')
let $mdivID := request:get-parameter('mdiv', '')
+let $lang := request:get-parameter('lang', 'en')
let $mei := doc($uri)/root()
-let $ret := local:getMeasures($mei, $mdivID)
+let $ret := local:getMeasures($mei, $mdivID, $lang)
return concat('[', string-join($ret, ','), ']')
\ No newline at end of file
diff --git a/add/data/xql/getPages.xql b/add/data/xql/getPages.xql
index 64acefa78..302fae175 100644
--- a/add/data/xql/getPages.xql
+++ b/add/data/xql/getPages.xql
@@ -32,9 +32,10 @@ declare namespace xmldb="http://exist-db.org/xquery/xmldb";
declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
let $uri := request:get-parameter('uri', '')
+let $lang := request:get-parameter('lang', 'en')
let $mei := eutil:getDoc($uri)/root()
-let $disclaimer := $mei//mei:pubStmt//mei:useRestrict[@type = 'disclaimer']/string() => replace('\n', '
')
+let $disclaimer := $mei//mei:pubStmt//mei:useRestrict[@type = 'disclaimer'][if (./@xml:lang) then (./@xml:lang = $lang) else (.)]/string() => replace('\n', '
')
let $ret := for $surface in $mei//mei:surface
(:let $image := doc($surface/mei:graphic[@type='facsimile']/string(@target))/img:image:)
diff --git a/app/controller/window/source/MeasureBasedView.js b/app/controller/window/source/MeasureBasedView.js
index 0c65dc7f5..57b69728c 100644
--- a/app/controller/window/source/MeasureBasedView.js
+++ b/app/controller/window/source/MeasureBasedView.js
@@ -72,7 +72,8 @@ Ext.define('EdiromOnline.controller.window.source.MeasureBasedView', {
method: 'GET',
params: {
uri: view.owner.uri,
- mdiv: mdiv
+ mdiv: mdiv,
+ lang: getPreference('application_language')
},
success: function(response){
var data = response.responseText;
diff --git a/app/controller/window/source/PageBasedView.js b/app/controller/window/source/PageBasedView.js
index aba59aa52..8cc60c942 100644
--- a/app/controller/window/source/PageBasedView.js
+++ b/app/controller/window/source/PageBasedView.js
@@ -44,7 +44,8 @@ Ext.define('EdiromOnline.controller.window.source.PageBasedView', {
url: 'data/xql/getPages.xql',
method: 'GET',
params: {
- uri: view.owner.uri
+ uri: view.owner.uri,
+ lang: getPreference('application_language')
},
success: function(response){
var data = response.responseText;
diff --git a/app/controller/window/text/FacsimileView.js b/app/controller/window/text/FacsimileView.js
index b15bb7a47..74b986ed0 100644
--- a/app/controller/window/text/FacsimileView.js
+++ b/app/controller/window/text/FacsimileView.js
@@ -48,7 +48,8 @@ Ext.define('EdiromOnline.controller.window.text.FacsimileView', {
url: 'data/xql/getPages.xql',
method: 'GET',
params: {
- uri: uri
+ uri: uri,
+ lang: getPreference('application_language')
},
success: function(response){
var data = response.responseText;
diff --git a/app/controller/window/text/TextFacsimileSplitView.js b/app/controller/window/text/TextFacsimileSplitView.js
index 3d0dd9683..6e39e8137 100644
--- a/app/controller/window/text/TextFacsimileSplitView.js
+++ b/app/controller/window/text/TextFacsimileSplitView.js
@@ -54,7 +54,8 @@ Ext.define('EdiromOnline.controller.window.text.TextFacsimileSplitView', {
url: 'data/xql/getPages.xql',
method: 'GET',
params: {
- uri: uri
+ uri: uri,
+ lang: getPreference('application_language')
},
success: function(response){
var data = response.responseText;