From c0af3ebc2e87ad516d9bcf68239b2a98b18bbc46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Mon, 6 Jul 2026 08:14:20 +0400 Subject: [PATCH] =?UTF-8?q?feat:=20r=C3=A9soudre=20le=20contenu=20par=20la?= =?UTF-8?q?ngue=20via=20Eleventy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eleventy.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eleventy.config.js b/eleventy.config.js index c9f221d..180fcc8 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,4 +1,10 @@ module.exports = function(eleventyConfig) { + // Locale-aware content: `t` resolves to the content bundle for the page's locale (fr by default) + eleventyConfig.addGlobalData("eleventyComputed", { + locale: (data) => data.locale || "fr", + t: (data) => data.i18n[data.locale || "fr"] + }); + // Copy assets folders to output eleventyConfig.addPassthroughCopy("src/assets");