diff --git a/application/view/common/resource-values.phtml b/application/view/common/resource-values.phtml
index ce241a8b0..822b9f9e8 100644
--- a/application/view/common/resource-values.phtml
+++ b/application/view/common/resource-values.phtml
@@ -15,10 +15,23 @@ if ($this->status()->isSiteRequest()) {
$lang = null;
$showValueAnnotations = true;
}
+$filterLocaleCallback = function ($value) use ($lang) {
+ $valueLang = $value->lang();
+ return $valueLang == '' || strcasecmp($valueLang, $lang) === 0;
+};
?>
- $propertyData): ?>
+ $propertyData):
+ $propertyValues = $propertyData['values'];
+ if ($filterLocale) {
+ $propertyValues = array_filter($propertyValues, $filterLocaleCallback);
+ }
+ if (!$propertyValues) {
+ continue;
+ }
+?>
-
@@ -32,7 +45,7 @@ if ($this->status()->isSiteRequest()) {
(vocabulary()->label()); ?>)
-
+
type();
$valueLang = $value->lang();
@@ -45,7 +58,6 @@ if ($this->status()->isSiteRequest()) {
$class[] = 'uri';
}
?>
-
-
@@ -64,8 +76,7 @@ if ($this->status()->isSiteRequest()) {
trigger('view.show.value', ['value' => $value]); ?>
-
-
+