diff --git a/lib/plugins/filter/template_locals/i18n.js b/lib/plugins/filter/template_locals/i18n.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/filter/template_locals/i18n.js
+++ b/lib/plugins/filter/template_locals/i18n.js
@@ -22,10 +22,9 @@ function i18nLocalsFilter(locals) {
       // i18n.languages is always an array with at least one argument ('default')
       lang = i18nConfigLanguages[0];
     }
-
-    page.lang = lang;
   }
 
+  page.lang = lang;
   page.canonical_path = page.canonical_path || locals.path;
 
   const languages = [...new Set([].concat(lang, i18nConfigLanguages, i18nLanguages).filter(Boolean))];
fix(i<I>n): page.lang is undefined when using the key `language` in front-matter (#<I>)