diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index 9719fc0..b438821 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -233,10 +233,13 @@ function hook_node_grants($account, $op) {
  *   of this gid within this realm can edit this node.
  * - 'grant_delete': If set to 1 a user that has been identified as a member
  *   of this gid within this realm can delete this node.
+ * - 'langcode': Optional key. The language code of the grant version. This
+ *   value is set automatically from the $node parameter during the database
+ *   writing.
  *
  *
  * When an implementation is interested in a node but want to deny access to
- * everyone, it may return a "deny all" grant:
+ * everyone in Catalan language, it may return a "deny all" grant:
  *
  * @code
  * $grants[] = array(
@@ -246,6 +249,7 @@ function hook_node_grants($account, $op) {
  *   'grant_update' => 0,
  *   'grant_delete' => 0,
  *   'priority' => 1,
+ *   'langcode' => 'ca'
  * );
  * @endcode
  *
@@ -269,7 +273,7 @@ function hook_node_access_records(Drupal\node\Node $node) {
   // treated just like any other node and we completely ignore it.
   if ($node->private) {
     $grants = array();
-    // Only published nodes should be viewable to all users. If we allow access
+    // Only published Catalan nodes should be viewable to all users. If we allow access
     // blindly here, then all users could view an unpublished node.
     if ($node->status) {
       $grants[] = array(
@@ -278,6 +282,7 @@ function hook_node_access_records(Drupal\node\Node $node) {
         'grant_view' => 1,
         'grant_update' => 0,
         'grant_delete' => 0,
+        'langcode' => 'ca'
       );
     }
     // For the example_author array, the GID is equivalent to a UID, which
@@ -290,6 +295,7 @@ function hook_node_access_records(Drupal\node\Node $node) {
       'grant_view' => 1,
       'grant_update' => 1,
       'grant_delete' => 1,
+      'langcode' => 'ca'
     );
 
     return $grants;
diff --git a/core/modules/node/node.install b/core/modules/node/node.install
index 7382320..157a3ed 100644
--- a/core/modules/node/node.install
+++ b/core/modules/node/node.install
@@ -141,6 +141,13 @@ function node_schema() {
         'not null' => TRUE,
         'default' => 0,
       ),
+      'langcode' => array(
+        'description' => 'The {language}.langcode of this node.',
+        'type' => 'varchar',
+        'length' => 12,
+        'not null' => TRUE,
+        'default' => '',
+      ),
       'gid' => array(
         'description' => "The grant ID a user must possess in the specified realm to gain this row's privileges on the node.",
         'type' => 'int',
@@ -568,6 +575,21 @@ function node_update_8003() {
 }
 
 /**
+ * Add language.langcode field to node_access table.
+ */
+function node_update_8004() {
+  // Add the langcode field.
+  $langcode_field = array(
+    'type' => 'varchar',
+    'length' => 12,
+    'not null' => TRUE,
+    'default' => '',
+    'description' => 'The {language}.langcode of this node.',
+  );
+  db_add_field('node_access', 'langcode', $langcode_field);
+}
+
+/**
  * @} End of "addtogroup updates-7.x-to-8.x"
  * The next series of updates should start at 9000.
  */
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 42d968d..f271b68 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -3404,10 +3404,12 @@ function node_access_acquire_grants(Node $node, $delete = TRUE) {
  *
  * @param Drupal\node\Node $node
  *   The $node being written to. All that is necessary is that it contains a
- *   nid.
+ *   nid. If it contains langcode - and grant doesn't contain it - this will
+ *   written to databse, else an empty string.
  * @param $grants
  *   A list of grants to write. Each grant is an array that must contain the
- *   following keys: realm, gid, grant_view, grant_update, grant_delete.
+ *   following keys: realm, gid, grant_view, grant_update, grant_delete and
+ *   langcode is an optional key which set automatically from $node parameter.
  *   The realm is specified by a particular module; the gid is as well, and
  *   is a module-defined id to define grant privileges. each grant_* field
  *   is a boolean value.
@@ -3429,7 +3431,7 @@ function _node_access_write_grants(Node $node, $grants, $realm = NULL, $delete =
 
   // Only perform work when node_access modules are active.
   if (!empty($grants) && count(module_implements('node_grants'))) {
-    $query = db_insert('node_access')->fields(array('nid', 'realm', 'gid', 'grant_view', 'grant_update', 'grant_delete'));
+    $query = db_insert('node_access')->fields(array('nid', 'langcode', 'realm', 'gid', 'grant_view', 'grant_update', 'grant_delete'));
     foreach ($grants as $grant) {
       if ($realm && $realm != $grant['realm']) {
         continue;
@@ -3437,6 +3439,9 @@ function _node_access_write_grants(Node $node, $grants, $realm = NULL, $delete =
       // Only write grants; denies are implicit.
       if ($grant['grant_view'] || $grant['grant_update'] || $grant['grant_delete']) {
         $grant['nid'] = $node->nid;
+        if (!isset($grant['langcode'])) {
+          $grant['langcode'] = isset($node->langcode) ? $node->langcode : '';
+        }
         $query->values($grant);
       }
     }
