diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index f874723..81e3f8a 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -1569,20 +1569,31 @@
       var vc = vcClass.create().fromJson(kq["collection"]);
       expect(vc.toQuery()).toEqual('availability = /CC-BY.*/ & author = "Goethe"');
     });
-  });
 
-  it('shouldn\'t be deserializable from collection with unknown type', function () {
-    var kq = {
-      "@type" : "koral:doc",
-      "match": "match:eq",
-      "type":"type:failure",
-      "value": "Goethe",
-      "key": "author"
-    };
+    it('shouldn\'t be deserializable from collection with unknown type', function () {
+      var kq = {
+        "@type" : "koral:doc",
+        "match": "match:eq",
+        "type":"type:failure",
+        "value": "Goethe",
+        "key": "author"
+      };
 
-    expect(function () {
-      vcClass.create().fromJson(kq)
-    }).toThrow(new Error("Unknown value type: string"));
+      expect(function () {
+        vcClass.create().fromJson(kq)
+      }).toThrow(new Error("Unknown value type: string"));
+    });
+
+    it('should return a name', function () {
+      var vc = vcClass.create();
+      expect(vc.getName()).toEqual(KorAP.Locale.VC_allCorpora);
+
+      vc = vcClass.create().fromJson({"@type" : "koral:docGroupRef", "ref" : "DeReKo"});
+      expect(vc.getName()).toEqual("DeReKo");
+
+      vc = vcClass.create().fromJson({"@type" : "koral:doc", "key" : "author", "value" : "Peter"});
+      expect(vc.getName()).toEqual(KorAP.Locale.VC_oneCollection);
+    });
   });
 
 
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 07731c7..5d2b498 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -81,6 +81,8 @@
   const loc = KorAP.Locale;
   loc.SHOW_STAT = loc.SHOW_STAT || 'Statistics';
   loc.VERB_SHOWSTAT = loc.VERB_SHOWSTAT || 'Corpus Statistics';
+  loc.VC_allCorpora    = loc.VC_allCorpora    || 'all corpora';
+  loc.VC_oneCollection = loc.VC_oneCollection || 'a virtual corpus';
 
   KorAP._vcKeyMenu = undefined;
   KorAP._vcDatePicker = dpClass.create();
@@ -167,6 +169,7 @@
       return obj;
     },
 
+
     /**
      * Create and render a new virtual collection based on a KoralQuery
      * collection document
@@ -204,7 +207,7 @@
 
       return this;
     },
-
+    
     // Check if the virtual corpus contains a rewrite
     // This is a class method
     checkRewrite : function(json) {
@@ -339,6 +342,21 @@
       this.update();
     },
 
+
+    // Get the reference name
+    getName : function () {
+      if (this._root.ldType() === 'non') {
+        return loc.VC_allCorpora;
+      }
+      else if (this._root.ldType() === 'docGroupRef') {
+        return this._root.ref();
+      }
+      else {
+        return loc.VC_oneCollection;
+      }
+    },
+
+    
     /**
      * Get the generated json string
      */
